dropping namespace declarations in output

Discussion in 'XML' started by Keith Davies, Aug 14, 2004.

  1. Keith Davies

    Keith Davies Guest

    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

    "Some do and some don't. I *hate* that kind of problem."
    "Understandable. Consistency is important with **** ups."
     
    Keith Davies, Aug 14, 2004
    #1
    1. Advertising

  2. 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.

    --

    Martin Honnen
    http://JavaScript.FAQTs.com/
     
    Martin Honnen, Aug 15, 2004
    #2
    1. Advertising

  3. Keith Davies

    Keith Davies Guest

    On 2004-08-15, Martin Honnen <> 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"
    > 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.


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


    Keith
    --
    Keith Davies

    "Some do and some don't. I *hate* that kind of problem."
    "Understandable. Consistency is important with **** ups."
     
    Keith Davies, Aug 15, 2004
    #3
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Replies:
    5
    Views:
    14,589
  2. Mads Orbesen Troest

    Namespace declarations appearing in output.

    Mads Orbesen Troest, Apr 19, 2004, in forum: XML
    Replies:
    0
    Views:
    467
    Mads Orbesen Troest
    Apr 19, 2004
  3. Christian Hoertnagl
    Replies:
    1
    Views:
    393
    Martin Honnen
    May 22, 2004
  4. Simon Brooke
    Replies:
    8
    Views:
    4,239
    Simon Brooke
    Feb 11, 2006
  5. Andy Fish
    Replies:
    10
    Views:
    1,171
    Joseph Kesselman
    May 4, 2007
Loading...

Share This Page