Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Recent content by TonyMarston

  1. TonyMarston

    How to iterate through a node's attributes

    Yes, that works. Thank you.
  2. TonyMarston

    How to iterate through a node's attributes

    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...
  3. TonyMarston

    Error with client-side XSL when switching from HTTPS to HTTP

    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...
  4. TonyMarston

    How to get value of previous node in sorted order, not document order

    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...
  5. TonyMarston

    How to get value of previous node in sorted order, not document order

    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...
  6. TonyMarston

    How to get value of previous node in sorted order, not document order

    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"...
  7. TonyMarston

    How to get value of previous node in sorted order, not document order

    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...
  8. TonyMarston

    Cannot declare xsl:variable inside xsl:choose block

    Great answer. Thanks.
  9. TonyMarston

    Cannot declare xsl:variable inside xsl:choose block

    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=&quot;http://www.w3.org/1999/XSL/Transform&quot; version=&quot;1.0&quot;> <xsl:param name=&quot;curpage&quot;>2</xsl:param> <xsl:param...
  10. TonyMarston

    There is a code: &lt;?php $xsltproc

    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=&quot;name&quot;>default</xsl:param> where the value 'default' will be overwritten by whatever you supply during the transformation process.
  11. TonyMarston

    Cannot declare xsl:variable inside xsl:choose block

    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...
  12. TonyMarston

    Cannot declare xsl:variable inside xsl:choose block

    Is there any good reason why the following code does not work? <xsl:choose> <xsl:when test=&quot;foo&quot;> <xsl:variable name=&quot;var&quot; select=&quot;'foo'&quot; /> </xsl/when> <xsl:otherwise> <xsl:variable name=&quot;var&quot; select=&quot;'something else'&quot; />...
  13. TonyMarston

    Can you pass a string literal with xsl:call-template?

    Bloody heck, that was simple. Why didn't I think of that? Problem solved, thank you very much.
  14. TonyMarston

    Can you pass a string literal with xsl:call-template?

    I have created the following template: <xsl:template name=&quot;column_hdg&quot;> <xsl:param name=&quot;item&quot;/> <xsl:param name=&quot;string&quot;/> <!-- create hyperlink to sort on this field --> <a><xsl:attribute name=&quot;href&quot;><xsl:value-of...
  15. TonyMarston

    How to compare current value with previous or next occurrence?

    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...

Part and Inventory Search

Back
Top