You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@xalan.apache.org by bu...@apache.org on 2004/06/08 13:44:44 UTC

DO NOT REPLY [Bug 29437] New: - When I have name space in XML, its not working

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=29437>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=29437

When I have name space in XML, its not working

           Summary: When I have name space in XML, its not working
           Product: XalanC
           Version: 1.7
          Platform: HP
        OS/Version: Other
            Status: NEW
          Severity: Critical
          Priority: Other
         Component: XalanC
        AssignedTo: xalan-dev@xml.apache.org
        ReportedBy: guru.murthy@wipro.com


Hi,

I am usign SimpleXPathAPI utilty on HP-UX. I have foo.xml. The xml is as 
follows.

<?xml version="1.0"?>
<doc xmlns="http://www.foo.com">
  <name first="David" last="Marston">Mr. Marston</name>
  <name first="David" last="Bertoni">Mr. Bertoni</name>
  <name first="Donald" last="Leslie">Mr. Leslie</name>
  <name first="Emily" last="Farmer">Ms. Farmer</name>
  <name first="Myriam" last="Midy">Ms. Midy</name>
  <name first="Paul" last="Dick">Mr. Dick</name>
  <name first="Scott" last="Boag">Mr. Boag</name>
  <name first="Shane" last="Curcuru">Mr. Curcuru</name>
  <name first="Joseph" last="Kesselman">Mr. Kesselman</name>
  <name first="Stephen" last="Auriemma">Mr. Auriemma</name>
</doc>

$> SimpleXPathAPI foo.xml / /doc/name    
The string value of the result is:

< I did not get any result. But I am expecting Mr.Matson >

If I have foo.xml as follows
<?xml version="1.0"?>
<foo:doc xmlns:foo="http://www.foo.com">
  <name first="David" last="Marston">Mr. Marston</name>
  <name first="David" last="Bertoni">Mr. Bertoni</name>
  <name first="Donald" last="Leslie">Mr. Leslie</name>
  <name first="Emily" last="Farmer">Ms. Farmer</name>
  <name first="Myriam" last="Midy">Ms. Midy</name>
  <name first="Paul" last="Dick">Mr. Dick</name>
  <name first="Scott" last="Boag">Mr. Boag</name>
  <name first="Shane" last="Curcuru">Mr. Curcuru</name>
  <name first="Joseph" last="Kesselman">Mr. Kesselman</name>
  <name first="Stephen" last="Auriemma">Mr. Auriemma</name>
</foo:doc>

$> SimpleXPathAPI foo.xml / /foo:doc/name
The string value of the result is:
Mr. Marston

The difference between the above two XMLs is, one has name space foo and other 
does not have. Both XMLs are getting validated with the parser. Why it is not 
giving me the value in the first case. I should get Mr. Matson in both the 
cases. Is this a bug ? or Am I doing something wrong?

---------------------------------------------------------------------
To unsubscribe, e-mail: xalan-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xalan-dev-help@xml.apache.org