| | |
xsl error
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:
Solved Threads: 0
Having an issue where both my xml and xsl are parsing fine (when viewed in firefox) but when combined together, throw an error:
Error loading stylesheet: Parsing an XSLT stylesheet failed.
(I noticed a suimilar post but was reccommended by the system to start a new thread, as it was a year old)
Betting it's something simple I can kick myself for...
my xml (trimmed):
my xsl:
Error loading stylesheet: Parsing an XSLT stylesheet failed.
(I noticed a suimilar post but was reccommended by the system to start a new thread, as it was a year old)
Betting it's something simple I can kick myself for...
my xml (trimmed):
xml Syntax (Toggle Plain Text)
<?xml version="1.0"?> <?xml-stylesheet href="reporting.xsl" type="text/xsl"?> <Report> <Overview>in progress</Overview> <Header> <Field> <Name>Date</Name> <Type>date</Type> </Field> <Field> <Name>Status</Name> <Type>string</Type> </Field> <Field> <Name>Product1</Name> <Type>currency</Type> </Field> <Field> <Name>Product2</Name> <Type>currency</Type> </Field> <Field> <Name>Total</Name> <Type>currency</Type> </Field> </Header> <Results> <Result> <Field> <Value>04/09/2006</Value> <Sort>1144558800</Sort> </Field> <Field> <Value>Approved</Value> <Sort>1</Sort> </Field> <Field> <Value>$598.06</Value> <Sort>598.06</Sort> </Field> <Field> <Value>$749.67</Value> <Sort>749.67</Sort> </Field> <Field> <Value>$2,872.54</Value> <Sort>2872.54</Sort> </Field> </Result> <Result> <Field> <Value>05/09/2006</Value> <Sort>1147150800</Sort> </Field> <Field> <Value>Approved</Value> <Sort>1</Sort> </Field> <Field> <Value>$274.29</Value> <Sort>274.29</Sort> </Field> <Field> <Value>$815.49</Value> <Sort>815.49</Sort> </Field> </Field> <Field> <Value>$1,788.34</Value> <Sort>1788.34</Sort> </Field> </Result> </Results> </Report>
RSS, Web Services and SOAP Syntax (Toggle Plain Text)
<?xml version='1.0' encoding='ISO-8859-1'?> <xsl:stylesheet version='1.0' xmlns:xsl='http://www.w3.org/1999/XSL/Transform'> <xsl:output method='html' indent='yes' media-type='text/html' /> <xsl:template match='/'> <xsl:apply-templates /> </xsl:template> <xsl:template match='Overview'> <h1>Overview</h1> </xsl:template> <xsl:template match='Header'> <tr> <xsl:for-each match='Field'> <th><xsl:value-of select='Name' /></th> </xsl:for-each> </tr> </xsl:template> <xsl:template match='Results'> <table> <tbody> <xsl:for-each select='Result'> <xsl:call-template name='Result' /> </xsl:for-each> </tbody> </table> </xsl:template> <xsl:template name='Result'> <tr> <xsl:for-each match='Field'> <td><xsl:value-of select='Value' /></td> </xsl:for-each> </tr> </xsl:template> </xsl:stylesheet>
•
•
Join Date: Apr 2009
Posts: 4
Reputation:
Solved Threads: 0
OK, figured it out 
1) not an error as such, but the result would have put the header rows before the table, so restructured the xml and xsl to put teh header inside the result xml and html table.
2) the actual error: something dumb:

1) not an error as such, but the result would have put the header rows before the table, so restructured the xml and xsl to put teh header inside the result xml and html table.
2) the actual error: something dumb:
<xsl:for-each match='Field'> should be:<xsl:for-each select='Field'> firefox (at least) doesnt see that as an error (and I guess it's not exactly an error, but.. it is.) ![]() |
Similar Threads
- XML Bug Error. (XML, XSLT and XPATH)
- Passing special characters from java to XSL throgh data XML (XML, XSLT and XPATH)
- Error loading stylesheet: Parsing an XSLT stylesheet failed (RSS, Web Services and SOAP)
- "critical system error" + HJT log (Viruses, Spyware and other Nasties)
- Help with a cast error (ASP.NET)
- VB.NET Error (ASP.NET)
- Help needed in simple app while using XML,XSL (XML, XSLT and XPATH)
Other Threads in the RSS, Web Services and SOAP Forum
- Previous Thread: How To Authenticate from Web Services
- Next Thread: Bad XML
| Thread Tools | Search this Thread |
.htaccess 301 accept access alltop api authentication binarysecuritytoken blog card collaboration credit data development ebay email evernote flash google government highrise htaccess intel internet legal live netbeans patent paypal php podcast proxy redirect rss rssfeeds searchmonkey server service soap software swappingxmlfromflash swappingxmlnodes url web webservices webservicesecurity wiki wikipedia xerces xml xslt y!os yahoo ydn





