Re: [xsl] DOCTYPE causes appearance of unwanted attributes

Subject: Re: [xsl] DOCTYPE causes appearance of unwanted attributes
From: Paul DuBois <paul@xxxxxxxxxxxx>
Date: Mon, 26 Jul 2004 13:01:46 -0500
On Mon, Jul 26, 2004 at 04:33:28PM +0100, Colin Paul Adams wrote:
> >>>>> "Paul" == Paul DuBois <paul@xxxxxxxxxxxx> writes:
>     Paul> A while back I sent the following message to this list, in
>     Paul> which I asked how to prevent xsltproc from adding default
>     Paul> element attributes when processing an input document that
>     Paul> contains a DOCTYPE declaration.  A few people suggested ways
>     Paul> to suppress these, but I have now realized that there is a
>     Paul> very simple way to keep the attributes from appearing:
>     Paul> Use "xsltproc --novalid" rather than just "xsltproc".  Then
>     Paul> xsltproc won't look at the DTD.
>     Paul> I'm embarrassed to say that I didn't think of this before,
>     Paul> but perhaps by mentioning it here, it will help someone else
>     Paul> who has the same problem.
> Surely the problem is that you have an unwanted DOCTYPE, not unwanted
> attributes?
> If the DOCTYPE says that an attribute has a default value, then if
> this is inappropriate you have the wrong DOCTYPE.

The DOCTYPE is correct, but I'm not interested in having the transform
add a bunch of unnecessary verbiage to an already large file.  Having
explicit attributes included with the values that they would have anyway
adds no information.

Current Thread