same data for 2 elements

please report bugs here

same data for 2 elements

Postby hmadhu » Tue May 08, 2012 5:35 am

Hi,

I am creating an xml with xsd. I need the same data for 2 elements in the xml. Data of element 'Ext' and 'Int' need to be the same. I am referring it to the same type, but each time different value is getting generated. This is my code.
...
<xs:element name="data" maxOccurs="unbounded">
<xs:complexType>
<xs:sequence>
<xs:element name="Ext" type="ext-type" />
<xs:element name="Int" type="ext-type" />
<xs:element name="ac" type="ac-type" />
</xs:sequence>
</xs:complexType>
</xs:element>
...

<xs:simpleType name="ext-type">
<xs:restriction base="xs:string">
<xs:minInclusive value="0" />
<xs:totalDigits value="7" />
<xs:pattern value="[9]{1}\-[4]{3}\-[5-9]{3}"></xs:pattern>
</xs:restriction>
</xs:simpleType>

Please guide me on this.


Thanks & Regards
Hari M
hmadhu
 
Posts: 1
Joined: Mon May 07, 2012 3:08 pm

Return to Benerator Bugs

Who is online

Users browsing this forum: No registered users and 1 guest

cron