xmlns:xsd generation problem

Discussion in 'XML' started by ksampson@cox.net, Jun 24, 2005.

  1. Guest

    I simply want to generate an XML document. I want the root element to
    include an attribute like
    <rootElement xmlns:xsd="http://someurl">
    ....
    </rootElement>

    ---
    With:
    <xsl:element name="rootElement" namespace="http://someurl">

    I can only produce:

    <rootElement xmlns="http://someurl">


    How do I get the "xsd" namespace prefix in there?


    Thanks.
    , Jun 24, 2005
    #1
    1. Advertising

  2. the main difference between using xsl:element and a literal result
    element is that the former does not copy inscope namespaces but the
    latter does, Since you want the xsd namespace copied you want to use a
    literal result element.
    so to generate


    <rootElement xmlns:xsd="http://someurl">

    use

    <rootElement xmlns:xsd="http://someurl" xmlns="http://someurl">

    not

    <xsl:element name="rootElement" namespace="http://someurl">


    David
    David Carlisle, Jun 27, 2005
    #2
    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:
    0
    Views:
    1,346
  2. killy971
    Replies:
    2
    Views:
    652
    Johannes Koch
    Aug 15, 2008
  3. afshar
    Replies:
    3
    Views:
    24,234
    aljar
    May 19, 2010
  4. Matthew Baskey

    xsd.exe Typed DataSet generation

    Matthew Baskey, Sep 3, 2004, in forum: ASP .Net Datagrid Control
    Replies:
    1
    Views:
    124
    Sean S.
    Sep 3, 2004
  5. John W. Long

    HTML Generation (Next Generation CGI)

    John W. Long, Nov 22, 2003, in forum: Ruby
    Replies:
    4
    Views:
    328
    John W. Long
    Nov 24, 2003
Loading...

Share This Page