Register FAQ Members List Calendar Search Today's Posts Mark Forums Read
 

Go Back   XSL - XML - RSS Forums > XSLForum: Main > XSL-XSD-XML and more

Tags:



Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 10-27-2008, 04:22 PM
Martin Honnen
 
Posts: n/a

Default Re: XSD Question



Jon Mcleod wrote:
> I am trying to structure an document schema that has a list of
> components, and a list of vendors. Each component "points" to a
> particular vendor using a vendor code.
>
> Until now, we've just included the vendor code in each component
> element. However, I'm trying to move everything into an XSD
> specification and I'm wondering if there is a "standard" way to do this,
> maybe with something like ID and IDREF?
>
> Below is a simplified example of the proprietary XML code we are using
> now. Any references or ideas of a better way to do this would be
> appreciated.
>
> ----
>
> <components>
> .
> .
> <component>
> <partno>74HC123</partno>
> <vendorcode>J1321999</vendorcode>
> </component>
> .
> .
> </components>
> <vendors>
> .
> .
> <vendor>
> <name>Arrow</name>
> <vendorcode>J1321999</vendorcode>
> </vendor>
> .
> .
> </vendors>


ID/IDREF is meant for attributes only, to be compatible with ID/IDREF in
DTDs. But the schema language provides xs:key/xs:keyref for your
purpose, see the primer
http://www.w3.org/TR/xmlschema-0/#sp...ysAndtheirRefs

--

Martin Honnen
http://JavaScript.FAQTs.com/
Reply With Quote
Sponsored Links
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



Contact Us -|- XSL - XML - RSS Forums -|- Archive -|- Top -|-Rules/Disclaimer-|-Help/Support -|-Advertise
© Camley Interactive (camley.info) 2008 - all logos and images are copywrite their respective owners.
Proud member of the Camley Interactive Network
Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.1.0 ©2007, Crawlability, Inc.
All times are GMT. The time now is 01:01 PM.
Style Developed by Epic Designz