943,754 Members | Top Members by Rank

Apr 10th, 2009
0

Bad XML

Expand Post »
Cannot figure out what is wrong with this stylesheet - attach it to any xml, it doesn't actually use the xml in this stripped down example:
RSS, Web Services and SOAP Syntax (Toggle Plain Text)
  1. <?xml version='1.0' encoding='ISO-8859-1'?>
  2. <xsl:stylesheet version='1.0' xmlns:xsl='http://www.w3.org/1999/XSL/Transform'>
  3. <xsl:output method='html' indent='yes' media-type='text/html' />
  4.  
  5. <xsl:variable name='columns' select='10' />
  6.  
  7. <xsl:template match='/'>
  8. <table>
  9. <tr>
  10. <td>
  11. <xsl:attribute name='colspan'><xsl:value-of select='floor( $columns / 3 )' /></xsl:attribute>
  12. column 1
  13. </td>
  14. <td>
  15. <xsl:attribute name='colspan'><xsl:value-of select='ceiling( $columns / 3 )' /></xsl:attribute>
  16. column 2
  17. </td>
  18. <td>
  19. <xsl:attribute name='colspan'><xsl:value-of select='floor( $columns / 3 )' /></xsl:attribute>
  20. column 3
  21. </td>
  22. </tr>
  23. </table>
  24. </xsl:template>
  25.  
  26. </xsl:stylesheet>
Firefox keeps telling me
Error loading stylesheet: XPath parse failure: Name or Nodetype test expected: (yeah it stops there)
the error reporting tool tells me it's apparently having an issue with the closing attribute tag...
Similar Threads
Reputation Points: 10
Solved Threads: 0
Newbie Poster
DaShiVa is offline Offline
4 posts
since Apr 2009
Apr 10th, 2009
0

Re: Bad XML

Again. slightly obvions answer. Seems as if posting here just helps me see the stupid thing I did, probably because I can't figure out how to delete a post...

Anyhows, yeah, I was using '/' instead of 'div'.
Reputation Points: 10
Solved Threads: 0
Newbie Poster
DaShiVa is offline Offline
4 posts
since Apr 2009

This thread is solved

Either the thread starter or a moderator has marked this thread as solved. You can most likely trust the responses and answers given. There is most likely no reason for any further responses to be posted here. If you have a related question, please start a new thread in this forum instead.

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in RSS, Web Services and SOAP Forum Timeline: xsl error
Next Thread in RSS, Web Services and SOAP Forum Timeline: new to SOAP::Lite for Perl





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC