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

XSD Schema type derived by restriction problem

  • From: "Christopher Loschen" <closchen@stanfordalumni.org>
  • To: <xml-dev@lists.xml.org>
  • Date: Fri, 20 Nov 2009 13:10:51 -0500

 XSD Schema type derived by restriction problem
Hi all,

This seemed like a good case to ask the experts about.

I'm working with a schema that defines a type by restricting the simple
dateTime type. Our mapping rules (based on the JAX-RPC spec) map this to the
class of the parent type (in this case, java.util.Calendar) rather than
creating a new class to represent the derived type. Consequently, when we
generate an XML message we specify that this element is of
xsi:type="xs:dateTime" (that is, the parent type).

However, when we do that, the schema validator flags the XML as invalid: it
cites an invalid QName at the xsi:type="xs:dateTime" attribute.

It makes sense to me that if the derived type is valid, the parent type should
also be valid: after all, any instance of the derived type will also be of the
parent type by polymorphism. Is that the case in the XML Schema spec? If so,
we should change our schema validator so that it accepts the parent as well as
the child in this situation. If not, I'm not sure how we can implement JAX-RPC
as specified.

Thanks for your insight!

Best regards,
Chris Loschen


____________________________________________________________________
   



[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-2011 All Rights Reserved.