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

matching attribute values with namespaces

Subject: matching attribute values with namespaces
From: Stefan Podkowinski <spodxx@xxxxxxxxx>
Date: Tue, 12 Jul 2005 22:46:02 +0200
stefan podkowinski
Hello

I'm currently having a hard time to create a xsl definition for the
following situation:

<document
   xmlns:providerns1="http://somewhere.com/"
   xmlns:providerns2="http://sometimes.com/">
<entry type="providerns1:header">test</entry>
<entry type="providerns1:paragraph">test</entry>
<entry type="providerns2:paragraph">test</entry>
<entry type="providerns2:footer">test</entry>
</document>

What I basically need to do is to check to which namespace each "type"
attribute value belongs to. Afterwards I'm able to go on to transform
the entry element depending on the type value for the determinated
namespace.

Two problems I'm facing:
1) I do have a list of all ns urls. However, I cannot make any
assumption about the ns prefixes (e.g. provider1:) that are being used
in the document. How can I decide this based on the ns url in my
current document using xslt?

2) If I had the prefix, how can I create different templates that will
match against the content of the type attribute?
<xsl:template match="entry/@type[<does content start with prefix xy>]">

Can anyone help me out? :)

TIA

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.