XML.orgXML.org
FOCUS AREAS |XML-DEV |XML.org DAILY NEWSLINK |REGISTRY |RESOURCES |ABOUT
OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index]
Re: [xml-dev] Find all Namespace Declarations

* K. W. Landry wrote:
>Given a java-based DOM implementation (any flavor you think best suited,
>ie.jdom, dom4j, etc....), the process must, when presented with any DOM of
>unknown content, print out all namespace declarations and their prefixes as
>defined at the root.

That's iterating over the .attributes collection checking the namespace-
URI fields of the Attr nodes in the process. Trivial in a conforming im-
plementation.

>For extra credit, any suggestions to recognize any
>attributes of any child element in a random walk through a DOM that are
>prefixed by any of the namespaces thus defined in the root.

I don't understand this requirement. What should it do for

  <foo xmlns:bar="x">
    <foo xmlns:bar"y">
      <foo bar:baz="..." xmlns:x="x" x:z='...'/>
    </foo>
  </foo>

?
-- 
Björn Höhrmann · mailto:bjoern@hoehrmann.de · http://bjoern.hoehrmann.de
Weinh. Str. 22 · Telefon: +49(0)621/4309674 · http://www.bjoernsworld.de
68309 Mannheim · PGP Pub. KeyID: 0xA4357E78 · http://www.websitedev.de/ 


[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index]


News | XML in Industry | Calendar | XML Registry
Marketplace | Resources | MyXML.org | Sponsors | Privacy Statement

Copyright 1993-2007 XML.org. This site is hosted by OASIS