Re: DOCTYPE handling in XML

Peter T Cash <[email protected]>
Newsgroups gmane.comp.lang.perl.xml
Message-ID <OF31FB5D73.0CB2B509-ON862574EA.00542C01-862574EA.00563D50@abbott.com>
Liam Quin <[email protected]> wrote on 10/22/2008 07:38:51 AM:

> On Tue, Oct 21, 2008 at 10:44:11AM -0500, Peter T Cash wrote:
> > For what it's worth, this appears to be a general limitation of XML 
tools. 
> > I've been writing XSLs and running them with the Saxon parser; I ran 
into 
> > the same problem. There's apparently no way to get an XSL transform to 

> > process an XML document and preserve ENTITY declarations. This appears 
to 
> > be a side effect of the fact that the parser won't copy the DOCTYPE 
> > declaration to the output, and the ENTITY declarations are part of the 

> > DOCTYPE. 
> 
> It's nothing of the sort.

The referent of "it" is unclear in this context. Care to be less delphic? 
 
> It's because most XML tools work on the result of parsing XML, and
> entities are expanded during parsing.

A parser is not, then, a tool? --In any case, the issue does not concern 
expanding entity references, but about preserving their declarations in 
the output (say, in the result of an identity template used to make 
changes to an existing XML document). If you know how to do this via an 
XSL transform (as opposed to, say, Perl string and file manipulation), 
then I (and the original questioner) would be grateful for any help you 
could provide. If you don't know how to do it...then why did you bother to 
reply? 
> 
> You can use XInclude as an alternative mechanism in many cases.

And this is relevant to the problem exactly how? --Try to keep in mind 
that I work in the real world, with the tools I am given, and live with 
the decisions made by others who work in the same environment. 

Peter

Peter T. Cash, Ph.D.
Senior Online Help Developer
Abbott Diagnostics Division
1921 Hurd Drive
Building LC2,  Mail Stop 2-30
Irving, TX 75038
[email protected]

> -- 
> Liam Quin, W3C XML Activity Lead, http://www.w3.org/People/Quin/
> http://www.holoweb.net/~liam/ * http://www.fromoldbooks.org/

_______________________________________________
Perl-XML mailing list
[email protected]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.