Groups and global elements
This should cover W3C XML Schema, Relax NG and DTD related problems.
-
- Posts: 1
- Joined: Thu Feb 10, 2005 10:44 pm
- Location: Eastern Mass.
Groups and global elements
Post by RigdenWannaBe »
Having a problem with this code. The problem is that I have a global Group that contains an element with the same name (XYZ) as a global element (XYZ).
The problem is that the Tag-Insight does not always pick the correct child node. You'd expect that in the element 'groupContainer,' the Group's XYZ->SHouldNotAppearInPickList. would appear (ignore its name) in the choices for children of the groupContainer->XYZ node. Yet it does not.
In my real code, I'm actually getting the reverse problem. In my element which references a "UniBar" element, I'm only being offered the choices in a global group's UniBar element child, not the choices in the global element'schildren.
P.S: Your Viennese competitor does not have this problem
Here's the XSD
And here is the using code. Delete everything and start from < to get groupContainer
The problem is that the Tag-Insight does not always pick the correct child node. You'd expect that in the element 'groupContainer,' the Group's XYZ->SHouldNotAppearInPickList. would appear (ignore its name) in the choices for children of the groupContainer->XYZ node. Yet it does not.
In my real code, I'm actually getting the reverse problem. In my element which references a "UniBar" element, I'm only being offered the choices in a global group's UniBar element child, not the choices in the global element'schildren.
P.S: Your Viennese competitor does not have this problem
Here's the XSD
Code: Select all
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" targetNamespace="grouptest" xmlns="grouptest" elementFormDefault="qualified">
<xs:element name="XYZParent">
<xs:complexType>
<xs:sequence>
<xs:element name="groupContainer">
<xs:complexType>
<xs:sequence>
<xs:group ref="globalGroup"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element ref="XYZ" minOccurs="0"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<!-- Global Types -->
<xs:group name="globalGroup">
<xs:sequence>
<xs:element name="XYZ" minOccurs="0">
<xs:complexType>
<xs:sequence>
<xs:element name="ShouldNotAppearInPickList" minOccurs="0"/>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:group>
<xs:element name="XYZ">
<xs:complexType>
<xs:sequence>
<xs:element name="ShouldAppearInPickList" minOccurs="0"/>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:schema>
Code: Select all
<?xml version="1.0" encoding="UTF-8"?>
<XYZParent xmlns="grouptest" elementFormDefault="qualified" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="grouptest ./GlobalGroups.xsd">
<groupContainer><XYZ></XYZ></groupContainer>
<XYZ><ShouldAppearInPickList></ShouldAppearInPickList></XYZ>
</XYZParent>
Hi,
Thanks, indeed there is a problem in determining all the possible elements defined by the schema when the new elements are defined locally different local elements having the same name. We will fix that. A workaround: if you add
<xs:element name="ShouldNotAppearInPickList"/>
to your schema then the content completion will offer the ShouldNotAppearInPickList element inside XYZParent/groupContainer/XYZ.
Best Regards,
George
Thanks, indeed there is a problem in determining all the possible elements defined by the schema when the new elements are defined locally different local elements having the same name. We will fix that. A workaround: if you add
<xs:element name="ShouldNotAppearInPickList"/>
to your schema then the content completion will offer the ShouldNotAppearInPickList element inside XYZParent/groupContainer/XYZ.
Best Regards,
George
Jump to
- Oxygen XML Editor/Author/Developer
- ↳ Feature Request
- ↳ Common Problems
- ↳ DITA (Editing and Publishing DITA Content)
- ↳ SDK-API, Frameworks - Document Types
- ↳ DocBook
- ↳ TEI
- ↳ XHTML
- ↳ Other Issues
- Oxygen XML Web Author
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Content Fusion
- ↳ Feature Request
- ↳ Common Problems
- Oxygen JSON Editor
- ↳ Feature Request
- ↳ Common Problems
- Oxygen PDF Chemistry
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Feedback
- ↳ Feature Request
- ↳ Common Problems
- Oxygen XML WebHelp
- ↳ Feature Request
- ↳ Common Problems
- XML
- ↳ General XML Questions
- ↳ XSLT and FOP
- ↳ XML Schemas
- ↳ XQuery
- NVDL
- ↳ General NVDL Issues
- ↳ oNVDL Related Issues
- XML Services Market
- ↳ Offer a Service