Skip to Content.
Sympa Menu

xom-interest - Re: [XOM-interest] Xpath parsing problem

xom-interest AT lists.ibiblio.org

Subject: XOM API for Processing XML with Java

List archive

Chronological Thread  
  • From: Dave Pawson <dave.pawson AT gmail.com>
  • To: Mike Miller <mm8041 AT gmail.com>
  • Cc: XOM API for Processing XML with Java <xom-interest AT lists.ibiblio.org>
  • Subject: Re: [XOM-interest] Xpath parsing problem
  • Date: Thu, 3 Mar 2011 14:58:58 +0000

On 3 March 2011 14:52, Mike Miller <mm8041 AT gmail.com> wrote:

> So to help me out here, it was my impression that tags within an xml
> document
> that are not preceeded by <something:  do not have namespaces applied, is
> this
> incorrect?

Depends :-)
Namespaces are inherited, so you need to look up the tree
from the point in question to see what namespaces are in scope.


If so, then I assume there is some default namespace that
> applies to
> all tags when one is not specified?  If it's too much to explain this to me,
> then
> could I get a link that would clarify?

W3C site?.... Better still,
Go buy Mike Kays book and learn about using namespaces with xpath
and XSLT, you won't regret it... unless you have a weak back.


>
> Or if its not too difficult, can I get a simple example of using the query
> method
> with xpath to drill into a document when namespaces are involved?

<xsl:template match="prefix:elname/prefix:elName">
Easy as that... when you know what namespace the element is in?


Honest, while they are a PITA, they are like.... something you
hate, but need to do something else?

No, not much immediate help I know.

Call it an investment in the future?



--
Dave Pawson
XSLT XSL-FO FAQ.
Docbook FAQ.
http://www.dpawson.co.uk




Archive powered by MHonArc 2.6.24.

Top of Page