A
Andy Fish
Hi,
I have an xml document that defines xmlns="foo" and an xslt stylesheet
that defines xmlns="bar". Running the transformation using
XslCompiledDocument in .Net 2.0, I get the following error message:
Cannot construct namespace declaration xmlns='bar'. Prefix 'p' is already
mapped to namespace 'foo'.
The problem does not happen using xml spy's built-in XSLT engine.
Unfortunately both the stylesheet and document are very large and I haven't
managed to reproduce a simple example yet.. However, I thought namespace
prefixes in the XML document and the stylesheet were independent (indeed
isn't that the whole point of namespace prefixes?).
I am not in control of the prefixes used in the xml documents I am
processing, so I would like to produce a stylesheet that works regardless of
the prefixes in the document.
Is this message likely to be down to some bug in XslCompiledTransform, or
something I am doing wrong?
Andy
I have an xml document that defines xmlns="foo" and an xslt stylesheet
that defines xmlns="bar". Running the transformation using
XslCompiledDocument in .Net 2.0, I get the following error message:
Cannot construct namespace declaration xmlns='bar'. Prefix 'p' is already
mapped to namespace 'foo'.
The problem does not happen using xml spy's built-in XSLT engine.
Unfortunately both the stylesheet and document are very large and I haven't
managed to reproduce a simple example yet.. However, I thought namespace
prefixes in the XML document and the stylesheet were independent (indeed
isn't that the whole point of namespace prefixes?).
I am not in control of the prefixes used in the xml documents I am
processing, so I would like to produce a stylesheet that works regardless of
the prefixes in the document.
Is this message likely to be down to some bug in XslCompiledTransform, or
something I am doing wrong?
Andy