Subject: Re: [xsl] processing multiple documents concatenated into one From: "Michael Kay mike@xxxxxxxxxxxx" <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> Date: Tue, 29 May 2018 07:59:44 -0000 |
If the file is in the form <root> .... </root> <root> .... </root> then you should be able to present to the XML parser a skeleton document of the form <!DOCTYPE dummy [ <!ENTITY x "multidoc.xml"/>] <dummy>&x;</dummy> and the XSLT stylesheet will just see this is a normal standard (and streamable) XML input. If however the file is in the form <?xml version="1.0"?> <root> .... </root> <?xml version="1.0"?> <root> .... </root> then you have a bit more work to do, because this isn't a well formed external entity. Assuming Java, you will need to write an implementation of the Java InputStream class that filters the input document and removes the XML declarations, and present this InputStream as the input to the XML parser. Michael Kay Saxonica > On 29 May 2018, at 07:49, Geert Bormans geert@xxxxxxxxxxxxxxxxxxx <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> wrote: > > All, > > I am (using XSLT3 streaming) processing files that are occasionaly a concatenation of multiple XML files > Before I start cutting documents apart before processing, > I wondered, maybe there is an XSLT streaming solution all the way. > Any ideas > > > Best regards, > > Geert Bormans > > -------------------------------------------------------------- > Markup UK - a conference about XML and other mark-up languages > London, June 9b10 2018 > Programme now available at http://markupuk.org/speakers.xhtml <http://markupuk.org/speakers.xhtml> > Register at http://markupuk.org/registration.xhtml <http://markupuk.org/registration.xhtml> > XSL-List info and archive <http://www.mulberrytech.com/xsl/xsl-list> > EasyUnsubscribe <-list/293509> (by email <>)
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
[xsl] processing multiple documents, Geert Bormans geert@ | Thread | [xsl] pretty printing - having CRLF, Geert Bormans geert@ |
Re: [xsl] pretty printing - having , cmarchand@xxxxxxxxxx | Date | Re: [xsl] pretty printing - having , Michael Kay mike@xxx |
Month |