Bad XML

Please support our RSS, Web Services and SOAP advertiser: PostgreSQL or MySQL? Compare and contrast the two most popular open source databases
Thread Solved

Join Date: Apr 2009
Posts: 4
Reputation: DaShiVa is an unknown quantity at this point 
Solved Threads: 0
DaShiVa DaShiVa is offline Offline
Newbie Poster

Bad XML

 
0
  #1
Apr 10th, 2009
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...
Reply With Quote Quick reply to this message  
Join Date: Apr 2009
Posts: 4
Reputation: DaShiVa is an unknown quantity at this point 
Solved Threads: 0
DaShiVa DaShiVa is offline Offline
Newbie Poster

Re: Bad XML

 
0
  #2
Apr 10th, 2009
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'.
Reply With Quote Quick reply to this message  
Reply

This thread has been marked solved.
Perhaps start a new thread instead?
Message:



Similar Threads
Other Threads in the RSS, Web Services and SOAP Forum
Thread Tools Search this Thread



Tag cloud for RSS, Web Services and SOAP
About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC