473,395 Members | 2,443 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,395 software developers and data experts.

[schemas] non-deterministic content model avoidance

hi,

i try to design a schema language, and i encoutered the famous
well-known problem :

valid documents are :
<page></page>
<page><odd/></page>
<page><odd/><even/></page>
<page><odd/><even/><odd/></page>
<page><odd/><even/><odd/><even/></page>
<page><odd/><even/><odd/><even/><odd/></page>
etc...

invalid documents are :
<page><odd/><odd/></page>
<page><odd/><even/><odd/><odd/><even/></page>
<page><odd/><even/><odd/><even/><even/></page>
<page><even/></page>

to express the constraints, we could write :
(odd, even)*, odd?
but it is invalid in DTD because of the violation of the
"non-deterministic content model" rule

as you know, this problem is unresolvable because it is an unambiguous
pattern which is not deterministic and can't be rewritten in a
deterministic form (i picked it from the Eric's relax book)

my schema language can express such a content model (4 lines) without
looking forward, but i'd like to know if :
-it is possible with W3C XML Schemas ?
-it is possible with Relax NG ?

additionally, i'd like to know whether Schematron can be used for
editing purposes or not (i don't think so), that is to say if one can
predict if an element is available with a given context, for example.

thanks for your help
--
Cordialement,

///
(. .)
-----ooO--(_)--Ooo-----
| Philippe Poulard |
-----------------------
Jul 20 '05 #1
0 1330

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

Similar topics

0
by: kyancy | last post by:
Hello All. We have several XML schemas to describe common component document parts. We then create new XML schemas as necessary that use "xsd:import schemaLocation=whateverLocation.." to include...
30
by: btober | last post by:
Whenever I create a temporary table, with something like CREATE TEMPORARY TABLE temptable1 AS SELECT * FROM paid.ad_hoc_query; New schemas appear, with names like "pg_temp_1". I guess the...
7
by: Roderick A. Anderson | last post by:
I'm looking for some input on a configuration I'm implementing. The long term goal is to providing hosting for companies and organizations with a basic/generic set of applications that use...
4
by: anonymous | last post by:
When I use the schema collection to apply many schemas to one XML instance document, I get an error if I do not qualify every element with the appropriate namespace. Both the W3C site and this...
0
by: Dave | last post by:
Hi all, I'm looking at designing an XSD for a signed document (enveloping) to be received from a third party. Primarily, I'm interested in what is the "best practice" with regards the...
2
by: John Jenkins | last post by:
Hi, I have a lot of schemas to load into a schema collection. I load them in by reading each one into a XMLTextReader from disk and add them into a schema collection. I have a couple of issues to...
1
by: CSN | last post by:
I have two machines between which I exchange dumps a lot. On the first (Windows/cygwin), pgsql was set up with "Administrator" as the main superuser - who owns all schemas in template0 and...
6
by: Dennis Gearon | last post by:
This post is as much about getting some questions answered as leaving the following definitions in the archives for the next person. After a quick perview of the web, I came up with the...
3
by: Sami Marzouki | last post by:
Hi, What I'm trying to do is: - To write a Web.config with custom sections. (Done) - To write a xsd schema for this custom sections.(Done) - Tell the Web.config to take the two schemas. When...
0
by: vihrao | last post by:
I am designing wsdl that uses multiple schemas. I can do this in two ways: 1) use multiple schema imports in one wsdl or 2) use multiple schema imports in to one common schema and then import a...
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
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
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...

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.