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

Expert's advice needed about XML Schema and defining some kind of relati

  • To: <xml-dev@l...>
  • Subject: Expert's advice needed about XML Schema and defining some kind of relation
  • From: "Peter Glantschnig" <justice@s...>
  • Date: Thu, 4 Dec 2003 14:00:45 +0100
  • Importance: Normal

peter glantschnig
Hello,

I recently had to solve some problem about XML Schema and I just want to
make sure, that there is no other much better way to solve the problem.

I will try to explain the main problem. Let's say you have two XML
files. One stores publications and the other one stores some names of
persons. Now each person is responsible for a couple of publications.
Now I want to make sure that this relation is always true by using XML
Schema. So when you enter a new publication, you should not be able to
assign a person to that publication, which can not be found in the
persons XML file. So at least when you validate the publications XML
file you should get an error.

Now what I need in the publications XML Schema is something like that:
"for the type persons only values are allowed which can be found in a
certain field in the persons XML file".

However I could not find a solution with the possibilities of XML Schema
right now. But I wanted a solution with XML technology. So basically
that?s what I did:

I made a XSL Transformation which transforms the persons XML file into a
XML Schema data type, which allows only certain values. This generated
XML Schema file I included into the XML Schema file of the publications.
So you enter the persons, then you make the XSL Transformation and then
you can enter some publications and validate the XML file. You are sure,
that all assigned person appear in the persons XML file!

I would be really grateful for any comments about my approach!

Thanks,
Peter Glantschnig










_____________________________________
Peter Glantschnig
www.glantschnig.info
 




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.