Thread view

Hi Michael
As part of the [xsl] Is exclude-result-prefixes wise in XHTML-to-XHTML
transformations?
thread David Carlisle [davidc@...] wrote:
> No, exclude-result-prefixes never gives the system licence to
> change the
> namespace of an element or attribute. It only stops namespace nodes
> being copied to the result tree because they happen to be in
> scope from
> somewher higher in the stylesheet. Any element that's in a
> namespace (or
> in no namespace) so all elements and attributes will _always_ have
> whatever namespace nodes needed to correctly interpret the name.
> Such namespace nodes may produce namespace declarations in the
> serialisation irrespective of whether that namespace is specified with
> exclude result prefixes.
I use namespaces extensively to modularise stylesheets and have been getting
fed-up with enumerating them all in exclude-result-prefixes, and a little
puzzled that my exclusions don't always work.
David's email prompted me to try exclude-result-prefixces="#all" in every
module and
let the output serialisation keep only what it actually needs.
I'm not clear from 11.1.3 whether this should work. Anyway I manage to
generate
an XML file that starts:
<?xml version="1.0" encoding="UTF-8"?>
<xmi:XMI xmlns:xmi="http://www.omg.org/XMI"; xsi:type="FragmentedSchema"
xmi:version="2.0">
<debug>
<schema xsi:type="Schema" xmi:id=".schema" name="schema"
xmlns:xmi="http://www.omg.org/XMI"&gt;
...
The xsi namespace has been excluded leaving the XML ill-formed,
and the xmi namepsace has been duplicated, reducing readability.
Is it reasonable to expect this to work in Saxon 7.9?
Regards
Ed Willink
------------------------------------------------------------------------
E.D.Willink, Email: mailto:EdWillink@...
Thales Research and Technology (UK) Ltd, Tel: +44 118 923 8278 (direct)
Worton Drive, or +44 118 986 8601 (ext 8278)
Worton Grange Business Park, Fax: +44 118 923 8399
Reading, RG2 0SB
ENGLAND http://www.computing.surrey.ac.uk/personal/pg/E.Willink
------------------------------------------------------------------------