dropping namespace declarations in output

K

Keith Davies

Hi All,

I'm sure this is possible, but I haven't seen how it's done.

I'm generating XHTML from XML using Saxon (6.5.3). My output files end
up with the namespace declarations from the stylesheet and input files.
This is preventing them from validating correctly at w3.

The xmlns attributes don't actually affect page display, but it'd be
nice to have the pages validate cleanly. How can I stop the namespace
declarations from being put in my output file?


Keith
 
M

Martin Honnen

Keith Davies wrote:

I'm generating XHTML from XML using Saxon (6.5.3). My output files end
up with the namespace declarations from the stylesheet and input files.
This is preventing them from validating correctly at w3.

The xmlns attributes don't actually affect page display, but it'd be
nice to have the pages validate cleanly. How can I stop the namespace
declarations from being put in my output file?

<xsl:stylesheet exclude-result-prefixes="prefix1 prefix2"
xmlns:prefix1="http://example.com/2004/08/whatever"
xmlns:prefix2="http://example.com/2004/08/whatelse"
but for that to work you can't have any result elements using those
namespaces.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,997
Messages
2,570,240
Members
46,830
Latest member
HeleneMull

Latest Threads

Top