[oXygen-user] RelaxNG "autocompletion"

Patrick Gundlach
Mon Oct 12 03:05:00 CDT 2009


Hello,

with the following grammar the contents of the element "foo" can  
either be the attribute "att" _or_ the element "elt".

<?xml version="1.0" encoding="UTF-8"?>
<grammar
   xmlns="http://relaxng.org/ns/structure/1.0"
   xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0"
   datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes">
   <start>
     <element name="root">
       <oneOrMore>
         <element name="foo">
           <choice>
             <attribute name="att" />
             <element name="elt"><text /></element>
             </choice>
         </element>
       </oneOrMore>
     </element>
   </start>
</grammar>


But when I insert <foo> into the editor, oxygen gives me the element  
<elt> as a child. So I have to delete the element manually if I use  
the attribute 'att'. I find this behavior a bit of a nuisance. Is this  
on purpose?

Patrick




More information about the oXygen-user mailing list