[XSLTXPATH2.0PR] chap 19 : parse-gedcom.xsl

Here should go questions about transforming XML with XSLT and FOP.
jacquesfauquex
Posts: 3
Joined: Thu May 29, 2008 10:44 pm

[XSLTXPATH2.0PR] chap 19 : parse-gedcom.xsl

Post by jacquesfauquex »

Hi:

I am learning xsl with version 4 of Michael Key XSLT 2.0 and XPATH 2.0. There is a very interesting example of parsing non structured text directly from xsl.
http://media.wiley.com/product_ancillar ... 0_ch19.zip

I tried this example from Oxygen 9.2 Mac Saxon 9B in the xslt debugger. That is, I try to process with parse-gedcom.xsl a file which should be passed as a parameter input='/Users/jacquesfauquex/Downloads/ch19/kennedy.ged'.

The debugger says:
/Users/jacquesfauquex/Downloads/ch19/kennedy.ged
Location: 1:0
Description: Content is not allowed in prolog.
URL:http://www.saxonica.com/documentation/j ... l#SXXP0003
E Content is not allowed in prolog. - 1:0
F Content is not allowed in prolog. - 1:0

Michael Kay explained that:
"I guess you probably configured oxygen to treat kennedy.ged as the primary source document of the transformation. This won't work - the primary input must be XML if it exists at all. This stylesheet runs without any primary source document; it reads kennedy.ged as a secondary input file using the unparsed-text() function."

how can I configure xslt debugger to accept no primary input, but a secondary input file ?

Thanks,

Jacques Fauquex
sorin_ristache
Posts: 4141
Joined: Fri Mar 28, 2003 2:12 pm

Re: [XSLTXPATH2.0PR] chap 19 : parse-gedcom.xsl

Post by sorin_ristache »

Hello,

You have to set the path of the file (in your case /Users/jacquesfauquex/Downloads/ch19/kennedy.ged) as the input parameter with the Configure parameters button available on the toolbar of the XSLT Debugger perspective. If your transformation does not have a primary input just select any well-formed XML file in the XML combo box on the toolbar of the XSLT Debugger perspective. If the transformation does not need an XML input this XML file will be ignored.

We will allow also an empty value in the XML combo box in a future version for the case when the transformation does not need a primary XML input.


Regards,
Sorin
Post Reply