Thanks for your quick replay.

Unfortunately, I do'nt have an existing document that conforms to the DTD.
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. Can I limit element
selection to the childs of the root, or do I have to go deeper?

---Sverre

Original Message:
-----------------
From: Hussein Shafie [email protected]
Date: Mon, 10 Apr 2006 12:52:17 +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:
> 
> I've build a configuration for XMLmind 3.1 to use a different DTD. In the
> template file I've included the XML and doctype declarations, and the root
> element.
> When I select the template in the File/New dialog the parser displays an
> invalid document and the message "the sequence of child elements is
> incorrect [cvc-complex-type.2.4]". I've interpreted this message to mean
> that the template lacks subelements for the root element. 

That's right.



> Based on the DTD,
> I've included child elements for the root element and re-validated the
> document, but without success.

You did the right thing but you probably didn't choose the right child
elements.



> What does this message actually mean, and how do I resolve the problem? Is
> there any general guidance in how to select the correct elements from the
> DTD to include in the template to achieve a valid document, 

There is a very simple method to create a document template. (I suggest
to do this with an XHTML or a DocBook document first to become familiar
with this technique.)

[1] Open an existing document conforming to your custom DTD (that is,
having the right <!DOCTYPE>) using "File|Open As Template..."

[2] You should get the *minimal* valid document. If needed, using XXE,
replace some elements and/or add more elements.

For example, in the case of a DocBook article, there is just a <para>.
In such case, it makes sense to add a <title> before the <para> and may
be also to add a <section> after the <para>.

[3] Save this document.

[4] Copy it to your configuration directory and rename it in order to
use it as a document template (i.e. replace the document template you
have created by hand).



> and which type
> of elements one needs to provide CSS rules for to get a WYSIWYG
> presentation in XMLmind?

This question is not related to the previous problem.

You need to style *all* elements. (XXE only has built-in rules for
comments and processing-instructions.)

More info. in
http://www.xmlmind.com/xmleditor/_distrib/doc/configure/configure.html

 
--
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