I was under the impression that descendant:: and // are exactly the same. I
wrote this very simple stylesheet to extract the last occurance of the ORD
element. But it doesnt work if I use //, instead if descendant:: is used, it
works just fine.
// ends up printing 'dummy' >Ist occurance of ORD
Can somebody explain, the reason
Thanks
--sony
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns="http://www.bellsouth.com/clipwfac"
xmlns:idm="http://www.bellsouth.com/idm" exclude-result-prefixes="idm">
<xsl:output method="xml" version="1.0" encoding="UTF-8" indent="yes"/>
<xsl:template match="/">
<xsl:value-of select=".//idm:ORD[last()]"/>
<xsl:value-of select="descendant::idm:ORD[last()]"/>
</xsl:template>
</xsl:stylesheet>
------------------------
xml used
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<message messageID="CYMND133-1083001914238000" clientID="jbbos"
systemInstance="WFAC" timeToLive="0" system="DSLNMS" priority="1"
cuid="WfacIDM" xmlns="http://www.bellsouth.com/idm">
<requestPayload>
<wfaRequest>
<changeDSL>
<updates>
<CircuitType>P</CircuitType>
<ACT>A</ACT>
<ORD>dummy</ORD>
<OLD_CKT>
<TN>904/262/2699</TN>
</OLD_CKT>
<CN>ZZIP</CN>
<SA>675 WEST PEACHTREEATLANTA GA|null|null|3</SA>
</updates>
<additionalFields>
<CircuitType>P</CircuitType>
<ACT>A</ACT>
<NEW_CKT>
<TN>904/262/2699</TN>
</NEW_CKT>
<OLD_CKT>
<TN>904/262/2699</TN>
</OLD_CKT>
<ORD>CYMND133</ORD>
<DD>2001-12-31-05:00</DD>
<CN>ZZIP</CN>
<SN>WFAC</SN>
<SA>675 WEST PEACHTREEATLANTA GA|null|null|3</SA>
<CSU>ADF81</CSU>
<EXK>904363</EXK>
<WC>904904</WC>
<Notes>
<noteLine>MNDRFLAVH01</noteLine>
<noteLine>1 MAIN ST </noteLine>
<noteLine>00MNDR001201_SC</noteLine>
</Notes>
<CMNT>DSL service/trouble report</CMNT>
<MFC>Y21</MFC>
<FLC>DSG</FLC>
</additionalFields>
</changeDSL>
</wfaRequest>
</requestPayload>
</message>