Re: elements in a namespace

Subject: Re: elements in a namespace
From: David Carlisle <davidc@xxxxxxxxx>
Date: Mon, 7 Jun 1999 18:44:06 +0100 (BST)
Mike Brown writes

> The default namespace, as declared by the xmlns attribute, is just for the
> assignment of a namespace to result tree elements that aren't expressed in
> the stylesheet with qualifiers (prefixes).

Not necessarily result tree elements, If you get fed up of sticking xsl:
in front of everything, you can do this:


and then just use

<template match=


Of course you then need to explicitly namespace any literal result
elements, or don't use literals, and use <element name="foo"> instead.

> The gist is: namespace declarations in the stylesheet have nothing to do
> with elements in the source tree.

Not really `nothing'. If you want to access elements in the source tree
which have a particular namespace associated, you have to declare that
namespace in the stylesheet, to associate the namespace with a prefix.
Don't you?


 XSL-List info and archive:

Current Thread