Discussion:
[XOM-interest] XInlcuded fragments and serializing
Pierre GAUTIER
2010-06-24 14:09:39 UTC
Permalink
Hello,

I post in this list hoping to find a solution to my problem involving XInclude.

I'm currently working on a main XML file that is divided into
fragments for collaborative contributions.

Loading the main XML with or without fragments is OK but when comes
the time to save the "document" here come the problems.

Once loaded all the fragments included in the main XML make a single
document and when I have to save this document all my <xi:include ...
tags are removed and the content of the initial fragments included
is saved into the main file. The sole rest of my include tags is a
xml:base attribute in the root of the included tag.

Is there a way to male XOM save the right elements in the right files
or should i chop the main XML myself after writing it ?

I hope I've been clear enough, I would be glad to give you more
informations if needed.

Thanks by advance for the interest you'll give to my problem,

Best regards,

Pierre GAUTIER
Dave Pawson
2010-06-24 14:30:53 UTC
Permalink
Post by Pierre GAUTIER
Hello,
I post in this list hoping to find a solution to my problem involving XInclude.
I'm currently working on a main XML file that is divided into
fragments for collaborative contributions.
Loading the main XML with or without fragments is OK but when comes
the time to save the "document" here come the problems.
Make it a one way process?
Never save the 'integrated' file except for further processing,
perhaps for output?
Always work on the 'fragments'.

Usually works out OK

HTH
--
Dave Pawson
XSLT XSL-FO FAQ.
Docbook FAQ.
http://www.dpawson.co.uk
Michael Ludwig
2010-06-24 14:55:15 UTC
Permalink
Post by Pierre GAUTIER
Once loaded all the fragments included in the main XML make a single
document and when I have to save this document all my <xi:include ...>
tags are removed and the content of the initial fragments included is
saved into the main file.
Calling XIncluder.resolve() replaces the <xi:include> elements by the
content their pointing to.
Post by Pierre GAUTIER
Is there a way to male XOM save the right elements in the right files
or should i chop the main XML myself after writing it ?
Don't think so, but maybe you could process the files included via
<xi:include> instead of building the master document?
--
Michael Ludwig
Loading...