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

Re: Getting XSD annotation from matched element

  • From: Michael Kay <mike@saxonica.com>
  • To: xml-dev@lists.xml.org
  • Date: Fri, 13 Aug 2010 13:44:50 +0100

Re:  Getting XSD annotation from matched element
On 13/08/2010 13:11, David wrote:
> Does anyone know, if in any XSLT or XQuery (or even Java) 
> library/project/implementation if there is the following capibility.
>
> When using a Schema Aware transformation (or in java say a Schema 
> Aware parser).
> Given a matched node (in XSLT say a <template match="...">  or in 
> XQuery or XSLT a variable referencing a node),
> is there any method, either standard or proprietary, which can return 
> the annotation element from the XSD corresponding to that node ?
>
> The use case of this is I'd like to embed annotations in XSD and use 
> them to control a transformation, and am not sure what tools I'm going 
> to have to do to accomplish this.
>
> Thanks for any suggestions on where to look.
>
>

Well, there's certainly nothing in the XSLT or XQuery spec that gives 
access to any schema information beyond the type-name, let alone to the 
annotations.

In Saxon you could get most of the schema information from its 
representation in an SCM file, which the schema processor can export - 
but not the annotations, which are discarded by the schema compiler. You 
would have to do your own processing of the source schema documents.

Xerces provides programmatic access to its schema components, including 
I believe the annotations, but that would mean (if using Saxon) 
processing and loading the schema twice.

Michael Kay
Saxonica


[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index]


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
 

Stylus Studio has published XML-DEV in RSS and ATOM formats, enabling users to easily subcribe to the list from their preferred news reader application.


Stylus Studio Sponsored Links are added links designed to provide related and additional information to the visitors of this website. they were not included by the author in the initial post. To view the content without the Sponsor Links please click here.

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.