Altova Mailing List Archives

Re: [xsl] DOCTYPE causes appearance of unwanted attributes

From: Paul DuBois <paul@------------>
Date: 7/26/2004 8:02:00 AM
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.


These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.