redeclare the same namespace prefix?

Discussion in 'XML' started by KJ, Sep 22, 2005.

  1. KJ

    KJ Guest

    Is the following invalid:

    <d:doc xmlns:d="http://whatever.com/ns">
    <d:title xmlns:d="http://whatever.com/ns">
    is this invalid?
    </d:title>
    </d:doc>

    Thanks
    -KJ
     
    KJ, Sep 22, 2005
    #1
    1. Advertising

  2. KJ wrote:

    > Is the following invalid:
    >
    > <d:doc xmlns:d="http://whatever.com/ns">
    > <d:title xmlns:d="http://whatever.com/ns">
    > is this invalid?
    > </d:title>
    > </d:doc>


    It is well-formed XML with namespaces. The question of validity does not
    arise unless you provide a schema.


    --

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

  3. KJ

    KJ Guest

    I guess the general question is: is it legal to declare the same
    namespace prefix pointing to the same namespace more than once, as
    shown.
     
    KJ, Sep 22, 2005
    #3
  4. In article <>,
    KJ <> wrote:

    >I guess the general question is: is it legal to declare the same
    >namespace prefix pointing to the same namespace more than once, as
    >shown.


    Yes it is.

    -- Richard
     
    Richard Tobin, Sep 23, 2005
    #4
  5. KJ

    KJ Guest

    thank you
     
    KJ, Sep 23, 2005
    #5
  6. KJ wrote:

    > is it legal to declare the same
    > namespace prefix pointing to the same namespace more than once, as
    > shown.


    Such a document conforms with <http://www.w3.org/TR/REC-xml-names/> so
    it is "legal" as far as that specifcation defines what is "legal".

    --

    Martin Honnen
    http://JavaScript.FAQTs.com/
     
    Martin Honnen, Sep 23, 2005
    #6
  7. KJ

    KJ Guest

    Got it, thanks.

    In case anyone was wondering, the reason I was asking, is because
    Visual Studio 2003 does not like it when elements redeclare namespaces.
     
    KJ, Sep 23, 2005
    #7
    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. heidi

    Tag prefix and namespace

    heidi, Nov 2, 2003, in forum: ASP .Net
    Replies:
    0
    Views:
    380
    heidi
    Nov 2, 2003
  2. =?Utf-8?B?c29tYXNsZWVw?=

    namespace prefix

    =?Utf-8?B?c29tYXNsZWVw?=, Jun 10, 2004, in forum: ASP .Net
    Replies:
    0
    Views:
    433
    =?Utf-8?B?c29tYXNsZWVw?=
    Jun 10, 2004
  3. Mark McKay
    Replies:
    0
    Views:
    467
    Mark McKay
    Dec 1, 2004
  4. Tim Tyler
    Replies:
    36
    Views:
    1,534
    Darryl L. Pierce
    Dec 10, 2004
  5. Chris  Chiasson
    Replies:
    6
    Views:
    658
    Richard Tobin
    Nov 14, 2006
Loading...

Share This Page