Bugs item #638829, was opened at 2002-11-15 11:06
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=116035&aid=638829&group_id=16035

Category: None
Group: None
Status: Open
Resolution: None
Priority: 5
Submitted By: Rami Ojares (rojares)
Assigned to: Nobody/Anonymous (nobody)
Summary: Selecting nodes from default namespace

Initial Comment:
Here is an XML document

<?xml version="1.0" encoding="latin1"?>
<taglib xmlns="http://java.sun.com/xml/ns/j2ee";>
        <tlib-version>0.1.1</tlib-version>
        <jsp-version>1.2</jsp-version>
</taglib>

I try selecting the taglib node:

xmlDoc.getRootElement().selectSingleNode("/taglib");

But all I get is null.

If I use prefixes I can get the taglib

SOURCE XML
<?xml version="1.0" encoding="latin1"?>
<tld:taglib xmlns:tld="http://java.sun.com/xml/ns/j2ee";>
        <tld:tlib-version>0.1.1</tld:tlib-version>
        <tld:jsp-version>1.2</tld:jsp-version>
</tld:taglib>

CODE
xmlDoc.getRootElement().selectSingleNode("/tld:taglib");

With Xalan I can use /:taglib to get the taglib in the first 
scenario (We already talked about it in previous posting)

It was not standard compliant syntax but my question is 
how can I select the taglib in according to the standard.

I tried /taglib[not(contains(name(), ':'))] but that also 
returns null.

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=116035&aid=638829&group_id=16035


-------------------------------------------------------
This sf.net email is sponsored by: To learn the basics of securing 
your web site with SSL, click here to get a FREE TRIAL of a Thawte 
Server Certificate: http://www.gothawte.com/rd524.html
_______________________________________________
dom4j-dev mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/dom4j-dev

Reply via email to