|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: XML source with DOCTYPE declaration
Hi David, At 10:49 PM 4/20/01, you wrote: > > This suggests there's a top-level switch intended to turn namespace > > prefixes on the names on and off. > >the declarations allow you to set the prefix used (or not) in the >instance, the default for HTML (and MathML which uses the same) >is for no prefix, but you can specify a prefix if you wish by using a >parameter entity declaration. > >but non of this makes any difference to the stylesheet unless you use th >ename() function (which is usually inadvisable for any input files using >namespaces) Ah -- so the namespace _declaration_ is there in the DTD regardless of whether you allow for prefixes? yes. Still, the existance of other declarations Zeljko cited -- ><!ENTITY % NS.prefixed "IGNORE"> ><!ENTITY % XHTML.prefixed "%NS.prefixed;"> ><!ENTITY % XHTML.xmlns "http://www.w3.org/1999/xhtml"> ><!ENTITY % XHTML.prefix ""> ><!ENTITY % XHTML.xmlns.attrib "xmlns %URI.datatype; #FIXED >'%XHTML.xmlns; %XLINK.xmlns.attrib;"> suggests that a similar kind of surgery, albeit deeper, might suffice to get the DTD to suppress its hard-wired namespace declarations Unless something has gone wrong, that would require editing the DTD. It's supposed to be the DTD for XHTML and XHTML elements are in the XHTML namespace. You could edit the DTD to change the namespace name but that is just the same kind of edit as changing the local name of an element from say <h1> to <title> in either case the result is a DTD but its no longer XHTML. . Admittedly, it might be going a bit further than the designers intended. But the basic requirement of being able to use the same XSLT on documents with or without the DOCTYPE declaration, without a big song and dance in the stylesheet, seems quite reasonable to me. All that needs happen is that the source document follows th eadvice in both the namespace and XHTML documents and have an explicit xmlns="..." in the HTML element, then the document is XHTML whether or not the DTD is read. David _____________________________________________________________________ This message has been checked for all known viruses by Star Internet delivered through the MessageLabs Virus Control Centre. For further information visit http://www.star.net.uk/stats.asp 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
|

Cart








