XML.com: XML From the Inside Out

XML.comWebServices.XML.comO'Reilly Networkoreilly.com
  Articles | Weblogs | Newsletter | Safari Bookshelf
advertisement

Article:
 XSLT Web Service Clients
Subject: error using xsltproc
Date: 2004-12-08 03:13:54
From: gryphyn59

When I try to run the example using xsltproc I get
the following error


D:\home\xml>xsltproc test.xsl expenses.xml
test.xsl:13: parser error : EntityRef: expecting ';'
<xsl:text>&ToCurrency=USD</xsl:text>
^
cannot parse test.xsl


What newbie snafu have I committed?


Previous Message Previous Message   Next Message Next Message


Titles Only Titles Only Newest First
  • error using xsltproc
    2004-12-08 06:11:47 Bob DuCharme [Reply]

    Actually, the mistake is mine, and XML.com made another in preparing the article for publication that prevents the stylesheet from being run.


    My mistake: my stylesheet had &ToCurrency=USD as the value of the xsl:text element but when I put that into the HTML of the article I should have escaped it as &amp; so that browsers displayed it as &.


    Their mistake: the first xsl:text element in the conversionURL template rule should not have a line break in it, because URLs shouldn't have line breaks in them. Take that out and it should work fine.


    Bob

    • error using xsltproc
      2004-12-08 06:15:31 Bob DuCharme [Reply]

      OK, I made the same mistake in my posting above--not escaping enough. I've revised the key sentence about my mistake:


      My stylesheet had &amp;ToCurrency=USD as the value of the xsl:text element but when I put that into the HTML of the article I should have escaped it as &amp;amp; so that browsers displayed it as &amp;.

Sponsored By:


Contact Us | Our Mission | Privacy Policy | Advertise With Us | | Submissions Guidelines
Copyright © 2008 O'Reilly Media, Inc. | (707) 827-7000 / (800) 998-9938