Chris Chiasson wrote:
> Maybe I'm just dumb, but I can't add a firstname or surname element as
> the child of an otherwise blank personname element using docbook
> version 5 (rng) under XXE. I noticed that the sample.xml file has
> these elements and that I can copy and paste the entire personname
> element to my article from the sample article.

By default[*] a personname is created using the simplest possible
content which is text.

Clicking inside a newly created personname element and hitting Shift-F1
(see attached screen shot) shows that personname can contain a ``loose
text mix'' *or* something more structured: firstname, surname, etc.

Therefore, explicitly select the text node, for example by clicking on
"#text" in the node path bar, and then use command Replace (Ctrl-R) to
replace this text node by a firstname element.

Then click inside the firstname element and use command Insert After
(Ctrl-J) to append a lastname element.

Note that all this complexity does not come from RELAX NG itself, but
rather from the content model chosen for the personname element in
DocBook5.

---
[*] You can define an *element* *template* for personname if you wish to
change this. See
http://www.xmlmind.com/xmleditor/_distrib/doc/configure/elementTemplate.html

Doing so without having to tweak configuration files is expected to
become trivial in XXE V3.2 or V3.3.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: Shift-F1.png
Type: image/png
Size: 8791 bytes
Desc: not available
Url : 
http://www.xmlmind.com/pipermail/xmleditor-support/attachments/20060106/0bf2df95/attachment.png
 

Reply via email to