xml - XSLT 3.0 partial streaming (Saxon) -


I have a big XML file with this type of tree (6 GB):

 < code> & lt; Report & gt; & Lt; Document & gt; & Lt; documentType & gt; E & lt; / documentType & gt; & Lt; Person & gt; & Lt; firstname & gt; John & lt; / firstname & gt; & Lt; Lastname & gt; Smith & lt; / lastname & gt; & Lt; / Person & gt; & Lt; / Documents & gt; & Lt; Document & gt; [...] & lt; / Documents & gt; & Lt; Document & gt; [...] & lt; / Documents & gt; [... there are so many documents] & lt; / Report & gt;   

So I used the new XSLT 3.0 streaming feature, with Saxon 9.6EE I do not want to decrease the streaming once in the document. This is the reason why I tried to use the copy-of () I think, what I want to do is "bust Mode "which is described here:

Here is my XSLT style sheet:

   & Lt; Xsl: template match = "/" & gt; Global Header & lt; Xsl: each selection = "/ report / document / copy-off ()" & gt; Doctor header document type: & lt; Xsl: Select the value = "document type" / & gt; Person / First Name: & lt; Xsl: Select the value = "person / first name" /> & Lt; Xsl: call-template name = "fnc1" /> Dock Footer & lt; / Xsl: each -G & gt; Global Footer & lt; / Xsl: Templates & gt; & Lt; Xsl: template name = "fnc1" & gt; Document type again: & lt; Xsl: Select the value = "document type" / & gt; & Lt; / XSL: Templates & gt; & Lt; / XSL: stylesheet & gt;   

It works in a single job because with copy-of () I use several xsl: value-of I am capable of direct () (at least I have this error * at least two users of line {xsl: value} on line 8, and {xsl: value-of} line 9 < / Code>)

But I still have streaming restrictions because & lt; Xsl: call-template name = "fnc1" /> creates this error:

  Error on xsl: Template stylesheet.xl of line 4 column 25 of xs: XTSE3430: template rule has been successful but it has been declared successibility rules Does not satisfy. * XSL: Call-templates is not a stylish sheet in this Saxon release. Stylesheet compilation is unsuccessful: 1 error has been reported   

So my question is: How to do a partial streaming (Document one by one) To be able to use the call-template (and other applicable-templates ) in a document?

Thank you for your help!

I think the call template should be attainable when the reference is based on the item (i.e. the stream node is not), then i find it a bug I will treat this as an alternative solution fnc1 by

  & lt; xsl: Template name = "fnc1" mode = "fnc1" match = "document" /> Can be declared.   

and call it

  & lt; Xsl: apply-select template = "." Mode = "fnc1" />   

Alternatively, replace the template with a function and provide the reference object as a clear argument.

You can track the bug here:

Although we do not yet claim 100% conformance with the XSLT 3.0 specification, Use any unnecessary departure in the release as a bug, as long as fixing them will make the product unstable.

Comments

Popular posts from this blog

php - PDO bindParam() fatal error -

logging - How can I log both the Request.InputStream and Response.OutputStream traffic in my ASP.NET MVC3 Application for specific Actions? -

java - Why my included JSP file won't get processed correctly? -