• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Query regarding uniqueness in XML schema.

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I was tryin to write an schema for the following scenario:

-> The name and index value should be unique in the below sample xml code:

<?xml version="1.0" encoding="UTF-8"?>
<eventlogs xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="eventlogs.xsd" version="1.0">

<eventlog name="MakeCall">
<field name ="COI" index="2">
<expr dynamictag="GetData" data="COI"/>
</field>
<field name ="BILLINGNUMBER" index="4">
<expr dynamictag="GetData" data="billingnumber"/>
</field>
<field name ="BILLINGNUMBER" index="4"> <!--This should give error-->
<expr dynamictag=GetData" data="abc"/>
</field>
</eventlog>
</eventlogs>

could any one pls suggest me how can I achieve this?
 
reply
    Bookmark Topic Watch Topic
  • New Topic