OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

 


 

   A practical question about XML Schema

[ Lists Home | Date Index | Thread Index ]

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 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@cucbc.com

 




 

News | XML in Industry | Calendar | XML Registry
Marketplace | Resources | MyXML.org | Sponsors | Privacy Statement

Copyright 2001 XML.org. This site is hosted by OASIS