A. Clarke wrote: > > I have a schema that defines two inline elements which only allow text > content. However, I am not able to select some text in XMLmind and then wrap > the text with these elements. Instead I have to insert the element and the > cut and paste the text into the element. I'm sure my users won't be happy. > > I must be making a basic error somewhere. I'd appreciate any advice. > > I have included some code snippets below. > > PS: Here is the relevant section from my schema: > > <xs:element name="p"> > <xs:complexType mixed="true"> > <xs:choice minOccurs="0" maxOccurs="unbounded"> > <xs:element ref="emphasis" /> > <xs:element ref="reference" /> > </xs:choice> > </xs:complexType> > </xs:element> > > <xs:element name="emphasis" type="xs:string" /> > > <xs:element name="reference" type="dd-fqname" /> > > <xs:simpleType name="dd-fqname"> > <xs:restriction base="xs:string"> > <xs:pattern value="([a-z]+[:])?[0-9a-zA-Z_]+(\.[0-9a-zA-Z_]+)?"/> > </xs:restriction> > </xs:simpleType> >
This is a limitation of XMLmind XML Editor. The convert and wrap command cannot be used on elements simply containing data. Why? because we didn't bother implementing this feature as the use of data-only elements such as your <emphasis> and <reference> is very rare. Most schema authors prefer to use attributes to model this kind of data. The workaround is, as always, to write a macro-command which automates what you do by hand and to tell your users to use the macro (bound to a keystroke or a toolbar button) rather than use the Edit tool. -- XMLmind XML Editor Support List [email protected] http://www.xmlmind.com/mailman/listinfo/xmleditor-support

