This week's book giveaway is in the Mac OS forum. We're giving away four copies of a choice of "Take Control of Upgrading to Yosemite" or "Take Control of Automating Your Mac" and have Joe Kissell on-line! See this thread for details.
If I am using IDREFs in XML Schema to refer from one element to another, then there should be no need to give all the elements. So for example I have an element with a required property and id 1. Now I define another element of the same type. It just uses IDREF to refer to the first element. There should be no need to specify the required properties for the second element, as we are just refering to the other element using IDREFs. But I get verification errors saying that reqiured properties are not specified. As an example, consider this XML Schema - <xsd:schema targetNamespace="http://www.a.com/ns/community.txt/Portal_0020Repository/test" xmlns:test="http://www.a.com/ns/community.txt/Portal_0020Repository/test" xmlns:xsd="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified"> <xsd:element name="test" type="test:test"/> <xsd:complexType name="test"> <xsd:sequence> <xsd:element name="test.gears" nillable="true" maxOccurs="10"> <xsd:complexType> <xsd:choice maxOccurs="unbounded"> <xsd:element name="str" type="xsd:string"/> </xsd:choice> <xsd:attribute name="ID" type="xsd:ID"/> <xsd:attribute name="IDREF" type="xsd:IDREF"/> </xsd:complexType> </xsd:element> </xsd:sequence> </xsd:complexType> </xsd:schema> The XML instance looks like this - <?xml version="1.0" encoding="UTF-8"?> <test:test xmlns:test="http://www.a.com/ns/community.txt/Portal_0020Repository/test" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.a.com/ns/community.txt/Portal_0020Repository/test c:\workbench\test.xsd"> <test:test.gears IDREF="a123"> </test:test.gears> <test:test.gears ID="a123"> <test:str>test</test:str> </test:test.gears> </test:test> This generates validation error (with XML-SPY) because for IDREF a123, str element is not specified. What is the point of using IDREF to refer to other element if I have to specify all the required properties again? Naveen