Hello,
I'm trying give a variable a value within XSL:for-each and access the variable after the XSL:for-loop has ended (or even after it's moved to the next XSL:for-each). I've tried using both global and local variables but they don't seem to work.
Is this possible? If not, is there another way around the problem?
-Hammer
...
I am trying to transform XHTML using an XSLT stylesheet, but I can't even get a basic stylesheet to match anything. I'm sure I'm missing something simple.
Here's my XHTML source document (no big surprises):
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
...
I want to get an attribute from another element.
E.g.
<xsl:template match="tag1">
Test: <xsl:value-of select="inner[@class='test']@name"/>
</xsl:template>
XML:
<xml>
<tag1>
<inner class="something" name="123"/>
<inner class="test" name="456"/>
</tag1>
</xml>
So what I'm expecting is to get
Test: 456
Obviously the ...
Hi,
I've created a XML data document and an XSLT stylesheet, and I want to output an HTML document based on the two. My stylesheet has the tag, and my XML document has the processor instuction (along with various "xsl:value-of" references). My question is, what are the actual "mechanics" of getting the XSLT processor (which, I understa...
I currently have a string (XSLT 1.0) which I'd like to turn into a NodeList so that it can be used the following example.
($testString represents an element in a XML tree)
<xsl:apply-templates select="$testString">
<xsl:template match="$testString">
I have tried using the following but neither seem to work
<xsl:apply-templates sele...
Possible Duplicates:
XSL: List divided into columns.
[XSLT]: Rendering a node sequence as M x N table
Hi All,
I need to print my XML in such a way that, in HTML, each row contains 2 columns.
In first column my first value gets printed and in second the second one, then the row gets change and it move on. it will be more cle...
Hi, i Have the following data in XML
<data>
<record>
<id>1</id>
<name>David</name>
<age>40</age>
</record>
<record>
<id>2</id>
<name>Tully</name>
<age>38</age>
</record>
<record>
<id>3</id>
<name>Solai</name>
<age>32</age>
</record>
<record>
<id>4</id>
<name>Michael</name>
<age>49</ag...
Note that I posed a very similar question earlier but the requirements have since changed
http://stackoverflow.com/questions/3842719/alphanumeric-sort-on-mixed-string-value
The primary difference in the requirements now is that the source XML can include forms with all alpha chars in the form_name or all integers.
The form_name can be...
I have some XML with <ListItem> elements, and I'd like to wrap any consecutive runs with <List> elements. So, source XML would look something like this:
<Section>
<Head>Heading</Head>
<Para>Blah</Para>
<ListItem>item 1</ListItem>
<ListItem>item 2</ListItem>
<ListItem>item 3</ListItem>
<ListItem>item 4</ListItem>
<Para>Some...
What is the difference between <xsl:apply-templates /> and <xsl:apply-templates select="." />. I thought that the select="." was not necessary, but I am getting different results depending on which I use.
Sorry if this is a repeat. I have tried searching this issue but could not find anything.
...
Hi,
I have the following snipset of code
<xsl:variable name="cId" value="c001" />
<clients>
<c001>Mario</c001>
<c002>Luigi</c002>
</clients>
And Based on variable's value, I need to select the correct element under clients.
For Example. variable cId is assigned with value c001.
Is there a way for me to select the value of ...
how to implement counter type functionality in xslt
...
My xsl is working fine when "xmlns" attribute doesn't exist in a node integration_test_results of xml. What i can do in xsl so it will work when "xmlns" attribute exist in integration_test_results node.
Please help me ASAP.
Here i am attaching my xml and xsl file:
Attach xml:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<?...
I have the following XSLT
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:msxsl="urn:schemas-microsoft-com:xslt" exclude-result-prefixes="msxsl">
<xsl:output method="html" omit-xml-declaration="yes" />
<xsl:strip-space elements="*"/>
<xsl:template match="@* | node()">
<xsl:copy...
This one is a bit tricky, and I've been stuck on it for a bit of time. What I wish to do is put tags in place of brackets '[' (e.g. for buttons, links, etc), and in place of ']'
<section>
<title>Buttons</title>
<orderedlist>
<listitem>
<para>Clicking on [Save] will attempt to save changes, then it navigates...
<tableLayout>
<tableColumn width="250"/>
<tableDivider spaceAfter="0" spaceBefore="0"/>
<tableColumn/>
<tableDivider spaceAfter="0" spaceBefore="0"/>
<tableColumn/>
</tableLayout>
When selecting the width for the current "column" using the above data (not my decision to structure it like this...
The XML within the 'formslist' variable is created using apply-templates. This snippet is from a 2.0 stylesheet.
<xsl:variable name="formlist">
<forms>
<FORM form_name="form1" print_seq="1200"/>
<FORM form_name="form2" print_seq="1500"/>
<FORM form_name="form3" print_seq="9000"/>
<FORM form_name="form4" print_se...
I'm using Visual Studio to debug a transform. If I am viewing the transform and select XML > Start XSLT Debugging, VS automatically opens the output file and as I step through the transform I can observe the output being written.
In my case however, because the transform is performed by an application that first sets some parameters, I...
I have to create slightly dynamic pdf (two variables) with two text blocks in different languages.
Most of the text in both blocks is static
I was thinking if I could create one template that would create xsl-fo for the layout. Then create two variables containing custom xml. Something like:
<xsl:variable name="TEXT_CONTENT_ENG" >
...
Hello,
I work on an xslt stylesheet, and I should receive as parameter two additional XML. I get an error when I use the node-set() method (from namespace ms, microsoft). The contents of the XML is correct. The parameters are send with classic ASP.
Here's the header and the call in xslt:
<?xml version="1.0" encoding="utf-8"?>
<xsl:styl...