- From: J. David Eisenberg <catcode@catcode.com>
- Date: Thu, 14 Mar 2002 11:44:14 -0600 (CST)
- To: Stuart Celarier <stuart@ferncrk.com>
- cc: www-svg@w3.org
On Thu, 14 Mar 2002, Stuart Celarier wrote:
[snip]
> One point still alludes me. Unlike a standard attribute, a namespace
> declaration is in scope for all descendents of the element on which it
> is declared (unless redeclared in a descendent element). In order to
> express that a particular namespace must be in scope for a given element
> or attribute, isn't it necessary to indicated that the namespace
> declaration can appear on any ancestor of that element or attribute
> (provided there are no conflicts)? How is this accomplished in a DTD? If
> SVG is combined with other XML in a document, the namespace could be
> declared on a non-SVG element. How can the SVG's DTD indicate that? How
> do you express in a DTD that the namespace prefix can be any NCName, and
> that NCName must match the prefix used on particular elements or
> attributes?
I'm not sure if this example helps (and my apologies if you arleady know
this technique and it doesn't do what you want):
http://www.w3.org/XML/9710rdf-dtd/rdf.dtd
here's a relevant portion:
<!ENTITY % rdf-namespace-prefix "rdf"> <!-- usually -->
<!ENTITY % rdf-namespace-address
"http://www.w3.org/971002/rdf"><!--@@??-->
<!ENTITY % rdf-namespace-declaration
'xmlns:%rdf-namespace-prefix; CDATA #FIXED
"%rdf-namespace-address;"'>
<!-- exported names: -->
<!ENTITY % RDF "%rdf-namespace-prefix;:RDF">
<!ENTITY % description "%rdf-namespace-prefix;:Description">
<!ENTITY % sequence "%rdf-namespace-prefix;:seq">
--
J. David Eisenberg http://catcode.com/
Received on Thursday, 14 March 2002 14:01:12 UTC