[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

// and descendant interchangeable ?

Subject: // and descendant interchangeable ?
From: <santony@xxxxxxxxxxxxx>
Date: Thu, 16 Sep 2004 21:55:27 -0400
xsl descendant
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>





--+------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe@xxxxxxxxxxxxxxxxxxxxxx>
--+--

Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.