Go Back   Velocity Reviews > Newsgroups > XML
User Name
Password
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

Reply

XML - Parse reserved attributes as normal attributes

 
Thread Tools Search this Thread
Old 09-22-2006, 09:27 AM   #1
Default Parse reserved attributes as normal attributes


Hello everyone!

I would want to know if reserved attributes (xml:lang, xml:space,
xmlnsrefix 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
  Reply With Quote
Old 09-22-2006, 01:04 PM   #2
Joe Kesselman
 
Posts: n/a
Default Re: Parse reserved attributes as normal attributes

Max wrote:
> I would want to know if reserved attributes (xml:lang, xml:space,
> xmlnsrefix 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
  Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump