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

XSLT subtree pruning/ filtering using namespace

Subject: XSLT subtree pruning/ filtering using namespace
From: "Chisanga Mwelwa" <sangz2000@xxxxxxxxxxx>
Date: Sat, 12 Jun 2004 10:22:49 +0000
chisanga mwelwa
Hi Guys!

Your help will once again be very much appreciated!

I am trying to filter out subtrees using element namespaces. I cant seem to find any decent references
to this problem so I have had a go at it my self. Below are some code snippets of what I am trying to do.
But unfortunately not getting anywhere!


Essentially I am trying to use the namespace-uri() function to solve my problem in a fashion similar
to "attribute filtering":


select="NAME[namespace-uri()='http://www.monday.com/']/AGE"

Please can anyone with an idea of how to solve my problem raise their hand? Thanks again!

MY XSLT FILE:
------------------------------------------------------------------------------
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:fo="http://www.w3.org/1999/XSL/Format">
<xsl:output method="text" indent="no"/>
<xsl:template match="EMPLOYEES">
<xsl:apply-templates select="NAME[namespace-uri()='http://www.monday.com/']/AGE"/>
</xsl:template>
...
------------------------------------------------------------------------------


MY XML FILE:
------------------------------------------------------------------------------
<EMPLOYEES>
<EMPLOYEE xmlns="http://www.monday.com/">
<NAME>Dilbert</NAME>
<AGE>99</AGE>
</EMPLOYEE>
<EMPLOYEE xmlns="http://www.tuesday.com/">
<NAME>Asok</NAME>
<AGE>9</AGE>
</EMPLOYEE>
</EMPLOYEES>
------------------------------------------------------------------------------

_________________________________________________________________
Express yourself with cool new emoticons http://www.msn.co.uk/specials/myemo


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.