Re: [xsl] accessing the input XML's doctype

Subject: Re: [xsl] accessing the input XML's doctype
From: "Darcy Parker" <darcyparker@xxxxxxxxx>
Date: Thu, 17 Jul 2008 14:11:58 -0400
Hi Michael,

Thanks for pointing us to SAX2.

I use a command similar to the following. (All one line from a command
line on a Windows based machine.)

-cp saxon9.jar;xercesImpl.jar;resolver.jar;XMLCatalog;
-iInputXML.xml -xsl:identity.xsl -o:output.xsl

I vaguely understand the command above and it works for me... but I
don't understand how to specify or configure Xerces to use SAX2 output
that would include markup of the doctype and entity declarations, and
also not resolve entity declarations in the XML.

I suspect Xerces is the most popular, but I am open to trying any sax2
parser.  Can you provide an example command that could be used with
saxon such that if I run an identity transform, I would get an xml
output that includes markup for the doctype and entity declarations
and leaves the original entities unresolved?


On Thu, Jul 17, 2008 at 11:28 AM, Michael Kay <mike@xxxxxxxxxxxx> wrote:
>> Can anyone point to a modified XML parser that works with
>> saxon that is similar to the one in the article?
> I suspect that Eric's article was written before the introduction of SAX2,
> which provides the information that Eric was suggesting should be exposed by
> a "modified parser". So you can now use any SAX2 parser to do this job.
>> Or is the custom SAX filter as Michael suggested a better approach?
> It's essentially the same approach. But the code to take the Java events and
> turn them into objects in the XDM data model still needs to be done.
> Michael Kay

Current Thread