XSL-Transformation of XML-Element with Namespace

Discussion in 'XML' started by schaf, Sep 14, 2005.

  1. schaf

    schaf Guest

    Hello NG!
    I would like to transform a XML-File into an new XML-File with
    additional information. That's no problem, but my source XML-File has a
    root element with a xmlns definition. Like this

    <Header xmlns="http://www.myHeader.ch/TestHeadrer">

    If i would like to copy this tag, with the following xsl-code, nothing
    is working:

    <xsl:template match="Header">
    <xsl:copy/>
    </xsl:template>

    If i delete the namespace definition in the XML-Header tag, it works.
    But what do I have to do, that my XSL-File knows the Header-Tag and the
    namespace ?

    Thanks
     
    schaf, Sep 14, 2005
    #1
    1. Advertising

  2. schaf wrote:


    > <Header xmlns="http://www.myHeader.ch/TestHeadrer">
    >
    > If i would like to copy this tag, with the following xsl-code, nothing
    > is working:
    >
    > <xsl:template match="Header">


    See <http://www.faqts.com/knowledge_base/view.phtml/aid/34022/fid/616>

    --

    Martin Honnen
    http://JavaScript.FAQTs.com/
     
    Martin Honnen, Sep 14, 2005
    #2
    1. Advertising

  3. schaf

    schaf Guest

    Hi Martin รจ

    > See <http://www.faqts.com/knowledge_base/view.phtml/aid/34022/fid/616>


    I'm sorry, but this link seems to do not work !
    Thanks
     
    schaf, Sep 14, 2005
    #3
  4. schaf

    schaf Guest

    I'm sorry the link works and also the solution.
    Thanks
     
    schaf, Sep 14, 2005
    #4
    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. Hugo Ferreira
    Replies:
    0
    Views:
    379
    Hugo Ferreira
    Jul 14, 2004
  2. CK
    Replies:
    7
    Views:
    530
    Richard Tobin
    Oct 13, 2003
  3. DrTebi
    Replies:
    1
    Views:
    677
    Patrick TJ McPhee
    Jun 27, 2004
  4. icedgar
    Replies:
    1
    Views:
    360
    Joris Gillis
    Feb 7, 2005
  5. Replies:
    0
    Views:
    539
Loading...

Share This Page