Re: [xsl] XML source with DOCTYPE declaration

Subject: Re: [xsl] XML source with DOCTYPE declaration
From: Wendell Piez <wapiez@xxxxxxxxxxxxxxxx>
Date: Fri, 20 Apr 2001 18:46:12 +0100
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?


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. 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.


Namespaces are nicely enabling for some things; for others they just seem to get in the way. Makes my head hurt.

Regards,
Wendell

======================================================================
Wendell Piez                            mailto:wapiez@xxxxxxxxxxxxxxxx
Mulberry Technologies, Inc.                http://www.mulberrytech.com
17 West Jefferson Street                    Direct Phone: 301/315-9635
Suite 207                                          Phone: 301/315-9631
Rockville, MD  20850                                 Fax: 301/315-8285
----------------------------------------------------------------------
  Mulberry Technologies: A Consultancy Specializing in SGML and XML
======================================================================


XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list



Current Thread