Re: [xslt] [xml] Losing DTD reference when saving XML file
- From: Ross Mohn <rpmohn waxandwane org>
- To: veillard redhat com
- Cc: xslt gnome org
- Subject: Re: [xslt] [xml] Losing DTD reference when saving XML file
- Date: Wed, 14 Feb 2007 21:47:24 -0500
On Wed, 2007-02-14 at 16:23 -0500, Daniel Veillard wrote:
> On Wed, Feb 14, 2007 at 04:10:40PM -0500, Ross Mohn wrote:
> > On Wed, 2007-02-14 at 14:27 -0500, Daniel Veillard wrote:
> > > On Wed, Feb 14, 2007 at 01:49:30PM -0500, Ross Mohn wrote:
> > > > Any hint on how to keep the DTD in the XML file when saving it, please?
> > > > Thanks in advance! -Ross
> > >
> > > I don't know because I don't understand, libxml2 always saves it by
> > > default.
> >
> > Thanks -- I did some more tests and discovered that it is removed from
> > the xmlDoc when I use the xsltApplyStylesheet() function. Shouldn't that
> > function treat the 2nd parameter as read-only? I've attached a short
>
> it doesn't.
>
> libxslt/transform.c: function xsltApplyStylesheetInternal
>
> if (doc->intSubset != NULL) {
> /*
> * Avoid hitting the DTD when scanning nodes
> * but keep it linked as doc->intSubset
> */
>
> The DTD node is not part of the XPath data model of a document.
> the information isn't lost though, that could be recovered, see
> the code in question.
Excellent, linking it back in seems to do the trick!
Thanks for your hint!
-Ross
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]