Finally I've managed to identify which elements to include in the template.
I selected the ones defined as mandatory, and by including them in the
sequence described by the DTD, I no longer get the "The sequence of child
elements is incorrect" message.

I've got one more challenge. Some of the elements have attributes that
require to be filled in for the document to be successfully validated by
the parser. The parser displays the message 'attribute "type" has invalid
value "": syntax error in NMTOKEN value "" [cvc-datatype-valid.1.2.1]
[cvc-attribute.3]'. As a result, the validity indicator at the lower left
corner of the XMLmind window is orange with a "x" in its centre.
It seems that these attribute values needs to be collected from the user
and included in the document instance of the template before it is parsed
and displayed. Is there a way to achieve this?

---Sverre

Original Message:
-----------------
From: Hussein Shafie [email protected]
Date: Mon, 10 Apr 2006 18:54:08 +0200
To: sverre.medalen at broadpark.no, xmleditor-support at xmlmind.com
Subject: Re: [XXE] The sequence of child elements is incorrect


sverre.medalen at broadpark.no wrote:
> 
> Unfortunately, I do'nt have an existing document that conforms to the DTD.

This is quite uncommon.

> Is it not possible to use the declarations in the DTD to select the right
> child elements of the root to include to build a valid template? Ex.
> include the child elements that are mandatory. 

No, there is no GUI to do this.

> Can I limit element
> selection to the childs of the root, or do I have to go deeper?

You need to go as deep as needed to create a valid document template (by
hand; using a text editor).

You can validate your document template using command line tool
(included in the distribution):

dtdvalid -d mydtd.dtd myinstance.xml

or just:

dtdvalid myinstance.xml

if myinstance.xml has the proper <!DOCTYPE>.

 
--
XMLmind XML Editor Support List
xmleditor-support at xmlmind.com
http://www.xmlmind.com/mailman/listinfo/xmleditor-support


--------------------------------------------------------------------
mail2web - Check your email from the web at
http://mail2web.com/ .



Reply via email to