[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

RE: XSLT, XHTML, and default attribute values [somewha

Subject: RE: XSLT, XHTML, and default attribute values [somewhat OT]
From: "Andrew Welch" <ajwelch@xxxxxxxxxxxxxxx>
Date: Tue, 14 Sep 2004 13:03:15 +0100
xslt xhtml
> Colin Paul Adams <colin@xxxxxxxxxxxxxxxxxx> writes:
>
> >>>>>> "Joseph" == Joseph Dane <jdane@xxxxxxxxxx> 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.

Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.