xsl-list
[Top] [All Lists]

Re: [xsl] Combining entity references into a single document

2021-12-03 12:07:11
On 03/12/2021 17:25, rick(_at_)rickquatro(_dot_)com wrote:> I have an XML 
document
generated from an Adobe FrameMaker book. It
creates multiple XML files and refers to them with entities in the
main XML file. Is there an XSLT 3 mechanism for combining everything
into a single XML document? Any pointers would be appreciated.

As Michael describes, this is the job of a parser.

The old osgmlnorm utility (part of the opensp package) does exactly
this. Assuming your file is called main.xml, you can type

$ osgmlnorm -wxml sgmlxml.dec main.xml

The -wxml switches from SGML to XML, and you will need a copy of the
SGML Declaration for XML (there's a copy at
http://xml.silmaril.ie/downloads/sgmlxml.dec if you can't find one
elsewhere).

This will write to standard output, so you can redirect it into a file
or a subsequent process.

Downside: it IS a normalizer, so all REQUIRED attributes will be
included, but the output will be a single XML file.

Peter
--~----------------------------------------------------------------
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
EasyUnsubscribe: http://lists.mulberrytech.com/unsub/xsl-list/1167547
or by email: xsl-list-unsub(_at_)lists(_dot_)mulberrytech(_dot_)com
--~--

<Prev in Thread] Current Thread [Next in Thread>