Thanks for the info. It looks like namespaces will be pesky in using xpath. I hope we can find a workaround. John On Thu, Jan 14, 2010 at 10:03:18AM -0800, Chris von See wrote: > Forgot to mention: I've never tried this with libxml2, but you may be > able to use "*" as the namespace and find all elements in the document > in any namespace with the element names you specify in the XPath > expression. For DTBook this would probably be fine (but not optimal), > but in documents that use other namespaces which contain elements with > the same name then it might be problematic. > > Chris > > On Jan 14, 2010, at 9:57 AM, Chris von See wrote: > > > > >On Jan 14, 2010, at 5:53 AM, John J. Boyer wrote: > > > >>I don't think the problem is related to namespaces, because the > >>tags in > >>Bookshare documents, which I am using for testing, don't have > >>namespace > >>prefixes. Also expressions using the local-name function still give > >>empty node sets. > > > >Check to see if the root element of the document has an "xmlns" > >attribute and, if so, if it specifies the DTBook namespace URI (it > >should!). If the attribute is present, then it's the default > >namespace and elements do not need to have a namespace prefix but > >you still need to qualify any XPath you use against that document > >using the DTBook namespace. > > > >Cheers > >Chris > >For a description of the software and to download it go to > >http://www.jjb-software.com > > For a description of the software and to download it go to > http://www.jjb-software.com -- John J. boyer; President, Chief Software Developer Abilitiessoft, Inc. http://www.abilitiessoft.com Madison, Wisconsin USA Developing software for people with disabilities For a description of the software and to download it go to http://www.jjb-software.com