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

Override default in a schema by more specific default in anotherschema?

  • From: "Tolkin, Steve" <Steve.Tolkin@F...>
  • To: xml-dev@l...
  • Date: Mon, 20 Nov 2000 15:38:41 -0500

xsd override
Suppose I have a base schema named e.g. base.xsd.  This sets the default
value for an attribute to e.g. base_value.  I know I can override this in
the instance document, e.g. foo.xml.  But what I want is to provide a more
specific default value in another another schema document, e.g. to org_value
in org.xsd.  Can I do this?  If I can do two levels I assume I can do n
levels, e.g. make the default my_value in my.xsd, etc.

If this works, what I am looking for in the exact way to express it.
Do I use schemaLocation in the instance document foo.xml to list them in
some order?
Or should the instance document just refer to my.xsd which in turn refers to
org.xsd?

Can the the same general approach be used for default values of elements?

Here is a snippet from base.xsd:

<complexType name="SomeType">
  <attribute name="someAttribute" type="string" use="default"
value="base_value"/>
</complexType>
<element name="someElement" type="self:SomeType"/>

Thanks, 
Steve
-- 
Steven Tolkin          steve.tolkin@f...      617-563-0516 
Fidelity Investments   82 Devonshire St. V10D    Boston MA 02109
There is nothing so practical as a good theory.  Comments are by me, 
not Fidelity Investments, its subsidiaries or affiliates.


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.