Page 1 of 1

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

Posted: Thu May 29, 2008 10:58 pm
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

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

Posted: Fri May 30, 2008 3:49 pm
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