Connecting Tech Pros Worldwide Help | Site Map

XSD Question

  #1  
Old October 27th, 2008, 03:25 PM
Jon Mcleod
Guest
 
Posts: n/a
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>
  #2  
Old October 27th, 2008, 03:35 PM
Martin Honnen
Guest
 
Posts: n/a

re: XSD Question


Jon Mcleod wrote:
Quote:
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/
Closed Thread


Similar Threads
Thread Thread Starter Forum Replies Last Post
XML XSD question mavis answers 3 May 31st, 2006 11:55 PM
Simple XML & XSD Question Mark Jerde answers 6 November 12th, 2005 04:16 AM
Xsd question Robert Strickland answers 2 November 12th, 2005 04:09 AM
XSD question: Allowing one required element and many optional elements. MENTAT answers 8 July 20th, 2005 09:32 AM
XSD question (same attributes, different elements...) Gooseman answers 1 July 20th, 2005 07:46 AM