XSD keyRef

K

Kent B

Hello people,

Sorry if this is the wrong newsgroup. I had a look and couldn't find a
more appropriate one for XSD.

I have a complex type defined in its own schema as follows:

<xsd:complexType name="myType">
<xsd:complexContent>
<xsd:extension base="myBaseType">
<xsd:attribute name="parentId" type="xsd:string" use="optional"/>
</xsd:extension>
</xsd:complexContent>
</xsd:complexType>

I want to apply a keyRef so that the parentId attribute must refer to a

valid ID (defined elsewhere in another schema). However, as far as I
can
tell, XSD only allows you to specify a keyRef inside an element
declaration.
But I don't want to declare an element. Does anyone know how I can
declare a
keyRef without requiring the element?

Thanks,
Kent
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,764
Messages
2,569,566
Members
45,041
Latest member
RomeoFarnh

Latest Threads

Top