Subject: Re: Is there an elegant way to copy a DOCTYPE declaration from one doc to another? From: "Jonathan Borden" <jborden@xxxxxxxxxxxx> Date: Thu, 10 Aug 2000 18:02:37 -0400 |
Eric, I think the problem is with the XPath Infoset which doesn't include the prolog and hence doctypedecl. Even if a full fidelity parser (e.g. not SAX) were to be used, XPath+XSLT would be clueless about what to do with the information. This is the XPath data model http://www.w3.org/TR/xpath#data-model What you are doing in your article and what I am doing in XSet is creating an XML expansion of the XML data model which itself fits into the XPath data model. XSet expands the entire XML property set into a set of elements and attributes, including things like PEs, GEs, internal and external subsets, whitespace, delimiters etc, etc, etc etc. A good reason this is useful is for this exact case: to allow XPath, and hence XSLT to operate on information which is otherwise lost. see: http://lists.xml.org/archives/xml-dev/200008/msg00239.html Jonathan Borden The Open Healthcare Group http://www.openhealth.org > Joe, > > Joe Ward wrote: > > > > So far, the only way I've found to keep the doctype declaration intact after > > a "pass-through" transformation is to hide a copy of the declaration in a > > comment via a pre-processor and then extract it. > > > > Is there a more elegant way? (Frankly, if I have to write a preprocess > > script, I might as well skip XSLT altogether.) > > I have posted the description of a possible solution to this issue: > http://www.xml.com/pub/2000/08/09/xslt/xslt.html > > > Is this a major flaw in XSLT? > > Not really in XSLT, rather on the layered architecture below XSLT (the > information is lost by the SAX interface). > > Eric > > > > Thanks, > > Joe > > > > (Still wearing XSL training wheels...) > > > > XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list > > -- > ------------------------------------------------------------------------ > Eric van der Vlist Dyomedea http://dyomedea.com > http://xmlfr.org http://4xt.org http://ducotede.com > ------------------------------------------------------------------------ > > > XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: Is there an elegant way to copy, Eric van der Vlist | Thread | Re: Is there an elegant way to copy, Mike Brown |
Re: XSL and JavaScript Problem, Robert Koberg | Date | Re: XSLT error "Switch from current, Joao Pedro Martins |
Month |