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

A practical question about XML Schema

  • To: "'XML Dev'" <xml-dev@l...>
  • Subject: A practical question about XML Schema
  • From: "Adam van den Hoven" <list@a...>
  • Date: Fri, 8 Nov 2002 08:13:24 -0800
  • Importance: Normal
  • Organization: CUCBC
  • Reply-to: <list@a...>

xsd use required
Title: Message
Good morning all,
 
I'm writing several schemas for a project I'm working on. I've done the work once and it works fine. Now I'm trying to do a better job of it. Since I'm using essentially the same constructs in many cases across a number of different document types, I want to use a common library.
 
I've run into a snag, probably caused by my "just winging it".
 
I'm using XLink as the the basis for my schemas which means that I have a number of arcs and locators around. They can easily use the following types:
 <xsd:complexType name="locatortype">
  <xsd:attribute ref="xlink:type" use="optional" fixed="locator"/>
  <xsd:attribute ref="xlink:href" use="required"/>
  <xsd:attribute ref="xlink:role" use="required"/>
  <xsd:attribute ref="xlink:label" use="required"/>
  <xsd:attribute ref="xlink:title"/>
  <xsd:attribute ref="xml:lang"/>
 </xsd:complexType>
 <xsd:complexType>
  <xsd:attribute ref="xlink:type" use="optional" fixed="arc" />
  <xsd:attribute ref="xlink:arcrole" use="required"/>
  <xsd:attribute ref="xlink:to" use="optional"/>
  <xsd:attribute ref="xlink:from" use="optional"/>
  <xsd:attribute ref="xlink:title"/>
 </xsd:complexType>
What I want to be able to do is say that the <content> element uses the locatortype and has a fixed role of http://www.foo.com/bar. The <use> element is uses the arctype and its to attribute is required, its from is forbidden and the arcrole can be any one of these X things.
 
I can do all this in a one off sense but it seems to me that I shouldn't need to. One of the things that happened is that we decided to add an attribute to all the nodes doing arc type stuff. Now I have to go edit all the different instances. What I want to do is edit one.
 
Any thoughts on how to do this?
 

H. Adam van den Hoven

Web Developer

Credit Union Central of BC

p 604 7306380

e avandenhoven@c...

 

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.