473,396 Members | 1,827 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

xml schema: set only a particular value as unique

hi, i have a xml as

<itemCollection>
<item enabled="false" />
<item enabled="true" />
<item enabled="false" />
</itemCollection>

I want know if exists a solution with xml schema for validate that only one child can have enabled='true' .
If no way exists somebody have a solution for reformat my xml and do what i want?
thanks
Feb 25 '08 #1
1 1215
jkmyoung
2,057 Expert 2GB
This isn't possible with just xml schema.

You'd need to use something like schematron, or a different schema extension/alternative for this type of rule.
Feb 25 '08 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: Olaf Meyer | last post by:
Apprentently xerces 2.6.0 (Java) does not validate against contraints specified in the schema (e.g. constraints specified via unique element). The validation works with the XML editor I'm using...
1
by: X. Lee | last post by:
Hi, please take a look at this schema and tell me how I can make the value of my AttachmentKey element(s) unique within the entire instance document. I know that I have to use <key> or <unique>,...
5
by: mhuhn.de | last post by:
I am using XML Schema for quite a while but haven't written a single line of Relax NG yet. For what I know, I cannot define static content within an XML Schema. For example, I have the following...
6
by: bosgoverde | last post by:
I've tried several ways to achieve a xsd schema for the following xml example, but failed to do so. Valid: <Person> <Interest>Movies</Interest> <Interest>Computers</Interest> </Person>...
0
by: Rajesh Jain | last post by:
I Have 2 separate schemas. --------------Schema 1 is defined as below----------- <xs:schema targetNamespace="http://Schemas/1" xmlns="http://Schemas/1" xmlns:xs="http://www.w3.org/2001/XMLSchema"...
5
by: Lemon Tree | last post by:
Hello everybody. I have a problem with Schema Definitions and I cannot figure out how to solve it (provided that it could be solved :)) Here we go... Let's suppose to have a simple XML file...
1
by: Nichino | last post by:
Hello, I'm trying to define my first Xml Schema and have a problem. The XML I'd like to define through the Schema is the following one. Can you help me please? I don't know how to insert the 3...
13
by: Martin Z | last post by:
I'm making a CRUD screen for an Oracle database... but problem is that the primary key in that table is populated via an autonumber, which in Oracle is done just with triggers and sequences. ...
1
by: sakhawn | last post by:
hi all, I need to transform an xml file into a different format (Dublin Core schema) using xslt, file contains different records each record needs to transformed based on a unique ID (in this case...
0
by: icesign | last post by:
I know that the selector of these elements has a scope relative to the element being declared, but maybe there is a way to get beyond bounds of this scope or maybe just a way to extend base element?...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.