Re: elements in a namespace

Subject: Re: elements in a namespace
From: David Carlisle <davidc@xxxxxxxxx>
Date: Tue, 8 Jun 1999 11:00:08 +0100 (BST)
> I'm just disappointed in that there's no way to define a default namespace
> for references to source tree elements.

Hmm which makes it rather inconvenient to take a stylesheet that works
with instances of an XML DTD if those instances are then embedded into a
larger document using a namespace based mechanism.

eg I might have (in fact I have:-) stylesheets for MathML that all look

<xsl:template match="apply/diff" .....

If it ends up that MathML gets embedded into some larger scheme such as
docbook (or even html) via a namespace which might be of the form
 <math xmlns="";>
... (I just made that namespace uri up, currently there isn't an
official mathml namespace)

then I have to change all my stylesheet to have 
 xmlns:mml=""; somewhere (OK)
and mml:  everywhere  (not so good).

I can't off hand see how I could write an XSL transformation to add the
namespace prefix either, as recognising source tree elements in the
stylesheet isn't so easy. (Unless I looked for each of the elements in
MathML individually.)

Perhaps the moral is: If you think that an XML application may sometimes
be used in a namespace, _always_ use it via a namespace. Something to
raise at the Math WG teleconference this afternoon....


 XSL-List info and archive:

Current Thread