473,418 Members | 4,547 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,418 software developers and data experts.

RELAX NG require oneOrMore optional elements

Is it possible to require one or more from a list of optional elements?
If I have something like:

<element name="parent">
<oneOrMore>
<interleave>
<optional>
<element name="child1">
<text/>
</element>
</optional>
<optional>
<element name="child2">
<text/>
</element>
</optional>
</interleave>
</oneOrMore>
</element>

My intent is that <parentmust have at least 1 of the child elements.
But python-lxml doesn't seem to flag

<parent />

as erroneous.

-frank

Jul 14 '08 #1
0 1167

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Jari Kujansuu | last post by:
I am trying to learn to use jing through JARV interface and I have read JARV User's Guide (http://iso-relax.sourceforge.net/JARV/JARV.html). I have downloaded jingjarv-examples.zip from JARV...
6
by: Pieter | last post by:
I've read a lot of posts on "why relax ng is so very good" and on "why w3c xml schema should be the only schema language". I'm, however, still not clear on why I should prefer one over the other. ...
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...
7
by: slitvinov | last post by:
I am learning Relax NG. The problem is that I cannot figure out how to make a schema for a table. In my case I would like to make a table with any name of child elements (columns) but columns...
4
by: withtape | last post by:
Somebody please, please help me. I'm getting started using Relax NG to describe document schemas. After reading the grammar summarized by http://www.relaxng.org/spec-20011203.html (Section 5), I...
1
by: Tookelso | last post by:
Hello, I would like to have a group of elements which are *required* in one context, but each one is *optional* in another context. For example: I have a configuration file which has a...
1
by: Gerben Abbink | last post by:
In Relax NG, I understand all other group operators (interleave, choice, oneOrMore, zeroOrMore, optional), but what is the purpose of <group>? Can you give an example?
2
by: Andy Chambers | last post by:
Hi All, Is there a way to define an empty named pattern? Here's the use-case. I'm trying to use relax-ng to specify an extendable schema. Basically, people should be able to tack on whatever...
0
by: jhalpin | last post by:
I'm trying to write a schema. I have a compact form version which works fine, but the equivalent (?) xml format gets syntax errors from XML Nanny. Here's the schema <?xml version="1.0"...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
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
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...

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.