Parse reserved attributes as normal attributes

Discussion in 'XML' started by Max, Sep 22, 2006.

  1. Max

    Max Guest

    Hello everyone!

    I would want to know if reserved attributes (xml:lang, xml:space,
    xmlns:prefix etc.) are parsed and registered as normal attributes.
    As an example:

    xmlns:cc="http://namespace"

    attr name = "xmlns:cc"
    attr prefix = "xmlns"
    attr localName = "cc"

    Thanks,

    Max
    Max, Sep 22, 2006
    #1
    1. Advertising

  2. Max wrote:
    > I would want to know if reserved attributes (xml:lang, xml:space,
    > xmlns:prefix etc.) are parsed and registered as normal attributes.


    Depends on the parser and data model you're using.

    The DOM displays all of these as normal attribute nodes.

    The XPath data model considers namespace declarations a different kind
    of node.

    SAX presents namespace declarations either as separate namespace events
    or as attributes or both depending on which switches you set on the
    parser and which events your code is actively listening for.

    Check the specs for the specific API you're using, and/or pick one that
    matches the task you're trying to perform.

    --
    () ASCII Ribbon Campaign | Joe Kesselman
    /\ Stamp out HTML e-mail! | System architexture and kinetic poetry
    Joe Kesselman, Sep 22, 2006
    #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. Christophe Geraud
    Replies:
    1
    Views:
    515
  2. metaperl
    Replies:
    32
    Views:
    912
    NickC
    Sep 15, 2006
  3. Delaney, Timothy (Tim)
    Replies:
    10
    Views:
    667
    Jason
    Sep 14, 2006
  4. Steve Holden
    Replies:
    0
    Views:
    395
    Steve Holden
    Sep 13, 2006
  5. Replies:
    3
    Views:
    166
    osmium
    Nov 6, 2013
Loading...

Share This Page