Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > XML > dropping namespace declarations in output

Reply
Thread Tools

dropping namespace declarations in output

 
 
Keith Davies
Guest
Posts: n/a
 
      08-14-2004
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
--
Keith Davies
http://www.velocityreviews.com/forums/(E-Mail Removed)
"Some do and some don't. I *hate* that kind of problem."
"Understandable. Consistency is important with **** ups."
 
Reply With Quote
 
 
 
 
Martin Honnen
Guest
Posts: n/a
 
      08-15-2004


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"
xmlnsrefix1="http://example.com/2004/08/whatever"
xmlnsrefix2="http://example.com/2004/08/whatelse"
but for that to work you can't have any result elements using those
namespaces.

--

Martin Honnen
http://JavaScript.FAQTs.com/

 
Reply With Quote
 
 
 
 
Keith Davies
Guest
Posts: n/a
 
      08-15-2004
On 2004-08-15, Martin Honnen <(E-Mail Removed)> wrote:
>
>
> 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"
> xmlnsrefix1="http://example.com/2004/08/whatever"
> xmlnsrefix2="http://example.com/2004/08/whatelse"
> but for that to work you can't have any result elements using those
> namespaces.


Thank you very much. I didn't think to check stylesheet attributes
(I did check xslutput, xsl:document, xsl:result-document...)


Keith
--
Keith Davies
(E-Mail Removed)
"Some do and some don't. I *hate* that kind of problem."
"Understandable. Consistency is important with **** ups."
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
removing spurious namespace declarations on XSLT output Andy Fish XML 10 05-04-2007 01:33 PM
Using DOM Library to Add Namespace Declarations to Root Element Tag eric.jester@gmail.com Java 5 04-20-2005 10:30 PM
ADSL Dropping But not Dropping!! Chris Bales Computer Support 9 08-29-2004 06:25 PM
control over location of namespace declarations in XSLT Christian Hoertnagl XML 1 05-22-2004 10:32 AM
Namespace declarations appearing in output. Mads Orbesen Troest XML 0 04-19-2004 05:53 PM



Advertisments