[oXygen-user] Trying to debug a "non-deterministic" DTD

George Bina
Tue Oct 7 14:57:33 CDT 2014


As Adrian mentioned, you can create an XML instance and validate that 
with LIBXML, this will show non-deterministic content models from DTDs. 
For example on:
test.dtd
=========
<?xml version="1.0" encoding="UTF-8"?>
<!ELEMENT test (a*, b*, a*)* >
<!ELEMENT a (#PCDATA) >
<!ELEMENT b (#PCDATA) >
<!ELEMENT c (#PCDATA) >

test.xml
========
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE test SYSTEM "test.dtd">
<test>
</test>

LIBXML will give
System ID: .../test.xml
Main validation file: .../test.xml
Schema: .../test.dtd
Engine name: LIBXML
Severity: error
Description:  validity error : Content model of test is not determinist: 
(a* , b* , a*)*

See also
http://www.w3.org/TR/REC-xml/#determinism
and Tim Bray notes in the annotated XML specification:
http://www.xml.com/axml/notes/Determinism.html

Best Regards,
George
--
George Cristian Bina
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com

On 07/10/14 18:09, Oxygen XML Editor Support (Adrian Buza) wrote:
> Hello Frank,
>
> On what platform are you running Oxygen (Windows, Mac, Linux)?
> Oxygen uses Xerces for XML parsing and validation against DTD. For DTD
> validation there is just the default mode, there is no "strict mode".
> The options that affect DTD validation in Oxygen are located in Options
>  > Preferences, XML > XML Parser
>
> Are you validating the DTD itself or an XML against the DTD?
> If you validate the XML against the DTD, you can also use LIBXML
> (xmllint). In Windows you can also use MSXML 4.0 or MSXML.NET.
> You can find these in the the 'Custom Validation Engines' toolbar.
>
>
> Regards,
> Adrian
>
> Adrian Buza
> oXygen XML Editor and Author Support
>
> Tel: +1-650-352-1250 ext.2020
> Fax: +40-251-461482
> 
> http://www.oxygenxml.com
>
>
>
> On 07.10.2014 14:34, Frank Arensmeier wrote:
>> Hello!
>>
>> First time poster. I hope this question hasn’t been up for discussion
>> before – I was not able to find anything helpful in the archives. I
>> have a DTD that I need to debug. The ”problem" is that Oxygen
>> validates the DTD just fine, whereas some XML editors (e.g. XMetal)
>> complain about a ”non-deteministic” content model. So, my question is,
>> does Oxygen (15.2) has some kind of ”strict mode” DTD validation?
>> Because I do not have access to some XMetal-debug-fo, I must use
>> Oxygen to debug my DTD.
>>
>> Any help is greatly appreciated!
>>
>> /frank
>>
>> 	Frank Arensmeier | *Expertinfo* | Teknikinformation, XML-system och
>> språkkonsulttjänster | 
>> <mailto:> | Älvtomtagatan 14 703 42
>> Örebro | Mobile +46 70 233 90 39
>>
>> Please consider the planet before printing this e-mail.
>>
>>
>>
>>
>>
>>
>>
>> _______________________________________________
>> oXygen-user mailing list
>> 
>> http://www.oxygenxml.com/mailman/listinfo/oxygen-user
>
>
>
>
> _______________________________________________
> oXygen-user mailing list
> 
> http://www.oxygenxml.com/mailman/listinfo/oxygen-user
>


More information about the oXygen-user mailing list