|
RE: XSLT, XHTML, and default attribute values [somewhat OT]
2004-09-14 05:03:15
Colin Paul Adams <colin(_at_)colina(_dot_)demon(_dot_)co(_dot_)uk> writes:
"Joseph" == Joseph Dane <jdane(_at_)hawaii(_dot_)edu> writes:
Joseph> A consequence of this is that default attribute
values get
Joseph> added to the tree before my processor has a
chance operate
Joseph> on it.
Only if your XML parser reads the DTD. If you can configure
it not to
do so (and most have such a configuration option), then this won't
happen.
that's true. but then why not just remove the DTD
altogether? then you don't have to support obscure and/or
parser dependant configuration options.
I'm not sure it is true. If a DTD is specified in the xml the parser
*must* attempt to read it to ensure any defaulted values are present in
the XML, regardless of configuration. Turning off validation (I think)
simply suppresses validation errors. The only way I know of to parse an
xml file with a DTD specified (without access to the DTD itself) is to
implement a custom entity resolver. Of course, you can edit the XML
file prior to transforming to remove the doctype, but regex'ing over xml
markup just feels wrong.
I don't understand the benefits of using defaulted values, as anyone
studying the xml also needs to study the dtd to ensure they get the full
picture. Seems crazy, really.
cheers
andrew.
| Previous by Date: |
Re: [xml-dev] ANN: EXSLT.NET 1.1, Elliotte Harold |
| Next by Date: |
Re: XSLT, XHTML, and default attribute values [somewhat OT], David Carlisle |
| Previous by Thread: |
Re: XSLT, XHTML, and default attribute values [somewhat OT], Joseph Dane |
| Next by Thread: |
Re: XSLT, XHTML, and default attribute values [somewhat OT], David Carlisle |
| Indexes: |
[Date]
[Thread]
[Top]
[All Lists] |
|
|