I have a stylesheet with the following code:
<xsl:for-each select="//structure/table/column">
<col>
<xsl:if test="@width">
<xsl:attribute name="width" ><xsl:value-of select="@width" /></xsl:attribute>
</xsl:if>
<xsl:if test="@class">
<xsl:attribute...
This error only appears with IE.
I have a demo application on my website at http://www.radicore.org/demo.php in which all HTML is built using XSL transformations. The page contains 2 links:
http://www.radicore.org/demo/menu/logon.php for server-side transformations...
Here it is (for what it's worth):
<?xml version='1.0'?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
xmlns:msxsl="urn:schemas-microsoft-com:xslt"
xmlns:saxon="http://icl.com/saxon"
exclude-result-prefixes="msxsl...
My quick replies:-
(1) Yes, all the code resides in a sungle XSL stylesheet. I only quoted the relevant snippets.
(2) Yes, the variable does contain the OCC node, but it also contains other nodes, so I have to specify which one to process. The variable contains a tree structure just like the...
After a lot of playing around I eventually got it to work as follows:
(1) Declare the following namespaces to deal with the 'node-set' extension:
<?xml version='1.0'?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"...
I wish to process my XML data in a particular oder, so I am using the following code:
<xsl:apply-templates select="SYSTEM/TABLE/OCC">
<xsl:sort select="FIELD3"/>
<xsl:sort select="FIELD4"/>
</xsl:apply-templates>
Within the template I wish to obtain a value from the previous node...
Here it is in its entirety. It is actrually in a template that is called from a number of stylesheets.
<?xml version='1.0'?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
<xsl:param name="curpage">2</xsl:param>
<xsl:param...
When you specify parameters on the XSL transformation process you can only access thyem inside your XSL stylesheet using the following line:
<xsl:param name="name">default</xsl:param>
where the value 'default' will be overwritten by whatever you supply during the transformation process.
Whoops. That was a simple typo when constructing the post. The code I actually ran was syntactically correct, but I still get the error.
I have tried the following XSL parsers:
- the Sablotron extension in PHP
- Komodo (XSL debugger) from Activestate
- Microsoft's MSXML parser v4
The same...
Is there any good reason why the following code does not work?
<xsl:choose>
<xsl:when test="foo">
<xsl:variable name="var" select="'foo'" />
</xsl/when>
<xsl:otherwise>
<xsl:variable name="var" select="'something else'" />...
I have created the following template:
<xsl:template name="column_hdg">
<xsl:param name="item"/>
<xsl:param name="string"/>
<!-- create hyperlink to sort on this field -->
<a><xsl:attribute name="href"><xsl:value-of...
After a lot of trial and error I have managed to find the solution:
1) Create a variable to hold the current value of position()
2) Create a variable to hold the data from an item in the previous/next occurrence
3) Compare the item data in the current occurrence with the contents of variable...
I know how to get the number of the previous node, but I am trying to get the value of an item in the previous node so I can compare it with the value of the same item in the current node.
What I am trying to do is step through a sorted list and perform some processing when a value changes...
After sorting my XML data I want to detect when one of the values changes so that I can do something extra, such as insert another line break. I cannot find how to compare an item value with the previous or next occurrence in the structure. Can anyone help me please?
I am trying to extract the value of an element's position in the XML file so that I can create references to the current, previous and next element. Can anyone give a newbie some advice?
My XML file looks something like this:
<?xml version="1.0"?>
<?xml-stylesheet...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.