Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


RE: XSD with keys... what to use in Java to process XML?

From: "Michael Kay" <mike@--------.--->
To: "'dave'" <ceek63@-----.--->, <xmlschema-dev@--.--->
Date: 11/20/2007 12:05:00 AM
You need to say what your requirements are. Saying that your requirement is
to "leverage" your schema seems an odd way of expressing it.

I don't know of any technology that enables you to use key/keyref
definitions for anything other than validation. If you want to use keys for
navigation, use XSLT, with local key definitions within your stylesheet.
There's no reason why these should bear any relationship to the keys used
for validation. If you want to get maximum value from your schema, you can
use schema-aware XSLT. I don't think any current schema-aware XSLT
processors will exploit the key/keyref definitions for strong typing or
optimization, but it's certainly not beyond the bounds of what's possible in
principle.

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


> -----Original Message-----
> From: xmlschema-dev-request@w... 
> [mailto:xmlschema-dev-request@w...] On Behalf Of dave
> Sent: 19 November 2007 20:12
> To: xmlschema-dev@w...
> Subject: XSD with keys... what to use in Java to process XML?
> 
> 
> 
> If you've an XSD with key/keyref constraints, what is the 
> best XML parsing (JAXP vs JAXB) method to use in Java?
> 
> I did some reading on this. I was inclined to use Java-XML 
> binding frameworks to leverage my XSD. But JAXB 1.0 doesn't 
> support key/keyref (meaning doesn't support validation?? not sure).
> Also not sure if JAXB 2.0 supports it.
> 
> OR should I use JAXP instead?
> 
> Parsing performance is not an issue for my application.
> 
>   I know key/keyref constraints' use at the XSD  level.
>   Can you access these key/keyrefs at the Java
>   application level?
>   For e.g. I need to find the number of Keyrefs
>   referencing the Key in my Java app?
>   
>   Basically, I am trying to understand if I can
>   leverage these constraints at the Java level (like
>   accessing selector/field values, xpath expressions,
>   etc).
>   
>   Or are these constraints are only used at the XSD
>   level and XML validation?
>  
>   In short, how would one leverage these key/keyrefs  at the 
> Java application level?
>  
>   Thanks for any pointers.
> 
> 
>       
> ______________________________________________________________
> ______________________
> Be a better pen pal. 
> Text or chat with friends inside Yahoo! Mail. See how.  
> http://overview.mail.yahoo.com/
> 


From chitra.kv@g... Fri Nov 23 12:20:24 2007
Received: from wiggum.w3.org ([128.30.52.23])
	by frink.w3


transparent
Print
Mail
Like It
Disclaimer
.

These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.

.
.

transparent

transparent