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

RE: Resolving QName with XSLT 1.0

Subject: RE: Resolving QName with XSLT 1.0
From: "Michael Kay" <mike@xxxxxxxxxxxx>
Date: Wed, 1 Dec 2004 15:14:54 -0000
qname xslt
The namespace URI is

string(namespace::*[name()=substring-before(@xsi:type, ':')])

Michael Kay
http://www.saxonica.com/

> -----Original Message-----
> From: Chizzolini Stefano [mailto:chist@xxxxxx] 
> Sent: 01 December 2004 14:35
> To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
> Subject:  Resolving QName with XSLT 1.0
> 
> Hi all
> 
> I'm attempting to construct an xpath expression to select in 
> my xml instance
> a document element whose category subelement attribute 
> xsi:type matches a
> QName (say: "eur:invoice"), as follows:
> 
> <?xml version="1.0" encoding="ISO-8859-1"?>
> <documents
> xmlns="http://www.aaa.it/consulta/xdmModel"
> xmlns:eur="http://www.aaa.it/europa/xdm"
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> version="1.0">
>  <document id="kjsdlkj">
>   <category xsi:type="eur:invoice">
>    [...]
>   </category>
>  </document>
>  [...]
> </documents>
> 
> My question is: as the QName is not a simple literal (you know: the
> namespace prefix isn't relevant by itself), how can I be sure that my
> predicate matches "eur:invoice" as an expanded name
> ({http://www.aaa.it/europa/xdm}invoice) instead of the arbitrary
> "eur:invoice" string?
> Keep in mind that I'm using MSXML4 (XSLT 1.0 support), so it 
> seems not to be
> available the resolve-QName function described in the XSLT 2.0 spec
> (http://www.w3.org/TR/xpath-functions/#func-resolve-QName).
> 
> What could I do in this case?
> 
> Many thanks
> 
> Stefano

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.