Re: xsl:exclude-result-prefixes

Subject: Re: xsl:exclude-result-prefixes
From: David Carlisle <davidc@xxxxxxxxx>
Date: Sun, 12 Nov 2000 21:12:08 GMT

> I thought the REC was fairly clear about exclude-result-prefixes (7.1.1),
> but I have obviously misunderstood it.
> 
> Both xt & msxml generate a xmlns:text attribute in the following stylesheet

note that to a namespace aware processor such as xpath, attribute names
can not start with  "xmlns" xmlns:text="foo" is a namespace declaration
not an attribute.

exclude-result-prefixes will stop the processor copying nodes namespace
nodes to the result, but that just stops namespaces that are used in the
source, or in the stylesheet, appearing in the result __if they are not
used__ . If you use an element or attribute from a namespace in the
result then the processor has to add a namespace declaration to ensure
the output conforms to the namespace rec. This  is explained in the
procedure described in the section on the xml output method.

	<parent xsl:exclude-result-prefixes="test">
		<child test:name="my name" />

here the output has an attribute in the namespace http://test
and so when linearising the result as XML a namespace declaration
for this namespace must be added by the system.

Does your SVG plugin _really_ demand that you use an attribute name of
the form test:name without declaring a namespace for the prefix test:
if so it is surely in error.

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


Current Thread