[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: XML source with DOCTYPE declaration
At 12:57 AM 4/21/01, David wrote:
> Ah -- so the namespace _declaration_ is there in the DTD regardless of > whether you allow for prefixes? I was thinking of something sneaky like: <!ENTITY % XHTML.xmlns.attrib "xmlns %URI.datatype; #IMPLIED %XLINK.xmlns.attrib;"> in the internal subset, overriding the DTD's declaration of 'xmlns' as #FIXED. But I can see other reasons why this might get a bit complex (e.g. have to make sure the other parameter entities are also already declared, etc.), or be a bad idea for other reasons. As for your point that "there's no reason to suppose a stylesheet that matched the old name will match the new one", that's quite true. Problem is, the user (Zeljko) has a stylesheet that won't match the old name (i.e. the name as qualified by the DTD's namespace declaration) because it matches a corresponding local name with no namespace (since it was written for a document without the DTD). Since local names are the same, and the presence of the namespace is opaque to the user (since declared only in the DTD), it does not seem unreasonable to expect (or at least find a way for) the same stylesheet to work on either document. So I'm trying to figure out a simple way, not to write the stylesheet to match two sets of names (although such an approach may be the best way to go in this case: I haven't decided that), but rather to provide for the names in the DTD-less and DTD-valid instances to be the same. Another alternative approach could be, to give the well-formed instances themselves (note that observing your distinctions, David, these are *not* XHTML documents, are they?) the necessary declaration, as in <!DOCTYPE html [ <!ATTLIST html xmlns CDATA #FIXED "http://..." > ]> <html>...</html> ...and then replace this DOCTYPE with the standard declaration when validation is called for. But only Zeljko can determine what the best solution is in this case. Cheers, Wendell
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|