I am using xalan 1.9 with xerces 2.6.0. Using the sample code provided (SimpleXPathAPI) I get unexpected results when I use an XML document that contains a default namespace.
I expected this xpath rule to return true but it returns false as I believe that the default name space is ignored. ./SimpleXPathAPI ./example.xml /FpML:FpML /FpML:FpML/IrML/irTrade/party/ FpML:partyTradeIdentifier/FpML:tradeId=55007835 The string value of the result is: false If I remove the default namespace in example.xml or add a prefix to the namespace. Then the xpath will rule will return _true_ ./SimpleXPathAPI ./example.xml /FpML:FpML /FpML:FpML/IrML/irTrade/party/ FpML:partyTradeIdentifier/FpML:tradeId=55007835 The string value of the result is: true The above xpath evaluates to TRUE with and without the default namespace using another processor. Is this a xalan bug or my misunderstanding of XML namespaces? Thanks in advance Lee Dittrich Example XML used in above test <?xml version="1.0" encoding="UTF-8"?> <FpML:FpML xmlns:FpML="http://www.fpml.org/2003/FpML-4-0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:IrML="http://irml.com/2003/trade" xmlns="http://irml.com/2003/trade" version="4-0"> <FpML:header> <FpML:messageId messageIdScheme="TEST">5554667</FpML:messageId> <FpML:sentBy>MySystem</FpML:sentBy> <FpML:sendTo>TradeCaptureSystem</FpML:sendTo> <FpML:copyTo>IntradaySystem</FpML:copyTo> <FpML:creationTimestamp>2004-07-13T15:38:00</FpML:creationTimestamp> </FpML:header> <IrML version="4-0"> <irTrade> <FpML:tradeHeader> <FpML:partyTradeIdentifier> <FpML:partyReference href="PARTY"/> <FpML:tradeId>55007835</FpML:tradeId> </FpML:partyTradeIdentifier> </irTrade> </IrML> </FpML:FpML>
