[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Iterative XML Handling
I have some XML as follows: <addresses> <address> <country>UK</country> <type>Billing</type> <lines> <line>add line text 1</line> <line>add line text 1</line> <line>add line text 1</line> <line /> <line>add line text 1</line> <line /> <line>add line text 1</line> </lines> </address> <address> <country>UK</country> <type>Service Address</type> <lines> <line /> <line>add line text 2</line> <line /> <line>add line text 2</line> <line>add line text 2</line> <line /> <line>add line text 2</line> </lines> </address> </addresses> My XSL for this code is... <xsl:template match="invoices/invoice/header/addresses"> <xsl:apply-templates/> </xsl:template> <xsl:template match="invoices/invoice/header/addresses/address"> <xsl:apply-templates select type="Billing"/> </xsl:template> <xsl:template match="invoices/invoice/header/addresses/address/country"> </xsl:template> <xsl:template match="invoices/invoice/header/addresses/address/type"> </xsl:template> <xsl:template match="invoices/invoice/header/addresses/address/lines"> <xsl:apply-templates/> </xsl:template> <xsl:template match="invoices/invoice/header/addresses/address/lines/line"> <TR><TD> <xsl:apply-templates/> </TD></TR> </xsl:template> However, I only wish addresses to appear that are Billing addresses, and not Service addresses (/invoices/invoice/header/addresses/address/type = "Billing"). How can this be achieved? Is it possible with my current XML construction? Thanks, Anthony Behan. XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|