You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@xalan.apache.org by shruti <sh...@noida.hcltech.com> on 2001/07/02 13:52:11 UTC
Namespace Problem in XPath
Hi,
I am querying the following xml document using the xpath expression - //my:book .
It does not return anything . how do we resolve namespaces using xalan xpath api.....
<?xml version="1.0"?>
<bookstore specialty="novel" xmlns:my="http://www.placeholder-name-here.com/schema/">
<my:book style="leather" price="29.50">
<my:title>Who's Who in Trenton</my:title>
<my:author>Robert Bob</my:author>
</my:book>
<book style="autobiography">
<title>Seven Years in Trenton</title>
<author>
<first-name>Joe</first-name>
<last-name>Bob</last-name>
<award>Trenton Literary Review Honorable Mention</award>
</author>
<price>12</price>
</book>
</bookstore>
Thanx
Shruti