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

XML Schema 1.0 files

Subject: XML Schema 1.0 files
From: davep <davep@xxxxxxxxxxxxx>
Date: Wed, 27 Mar 2013 10:14:01 +0000
 XML Schema 1.0 files
Given an XML schema, I want to find files containing definitions & references of a particular element

Root is

<xsd:schema xmlns="http://www.x"
	targetNamespace="http://www.x"
  ...

Later I see

<xsd:element ref="X"/>

and

<xsd:element name="X">
but also
<xsd:element ref="dc:X"/>


I'm looking for some xslt 2.0 that will combine
them to search for element X definitions and references
and report their namespace.
I'm working on a directory, so I'll be using collection() but
for one file all I want to know is
if element X (ref or def) is in the file, and if so, what the appropriate namespace is.
So the stylesheet parameters are the localname and the
returned value either nothing (not found) or the namespace in which the
element is, indicating it was found?
AFAICT in the above example, the namespace is /xsd:schema/@targetNamespace


Has anyone done this before please?

TiA

regards

--
Dave Pawson
XSLT XSL-FO FAQ.
http://www.dpawson.co.uk

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.