• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Using FOP on Linux and getting XSL formatting error

 
Guyle McClellan
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm trying to use FOP to generate PDF output using XML data and an XSL stylesheet. With one different version of the XSL things work fine, but when I use my primary XSL stylesheet, I get the error shown below:

---------
; Line#: 18; Column#: 47
; Line#: 18; Column#: 47
javax.xml.transform.TransformerException: A location path was expected, but the following token was encountered: \

There doesn't seem to be anything obviously wrong syntactically with my XSL file, but I'm baffled about where the formatting glitch is located. Can anyone help me me identify where the problem lies in this XML file?

An excerpt (including line 18) is shown below.

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
Paul Clapham
Sheriff
Posts: 20983
31
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
A quick scan for the offending backslash character leads directly to this line of code:



And there it is. Those backslashes aren't valid in an XPath expression.

There are several other lines like that with a similar error.
 
Guyle McClellan
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Fantastic. That was it! In my other XSL file, those backslashes were not present. Huge thanks Paul.
 
Paul Clapham
Sheriff
Posts: 20983
31
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You're welcome. And by the way, welcome to the Ranch!
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic