| Summary: | xs:extension used when defining types cause elements to be out of order | ||
|---|---|---|---|
| Product: | z_Archived | Reporter: | Shenxue Zhou <shenxue.zhou> |
| Component: | Sapphire | Assignee: | Ling Hao <ling.hao> |
| Status: | CLOSED FIXED | QA Contact: | |
| Severity: | normal | ||
| Priority: | P3 | CC: | konstantin |
| Version: | unspecified | ||
| Target Milestone: | --- | ||
| Hardware: | All | ||
| OS: | All | ||
| Whiteboard: | |||
Ling, Could you take a look? xs:extensions is working fine. The problem was caused by the fix to abstract and substitution attribute in bug 337232. Added unit test for more complete coverage. Verifed. Thanks Ling! |
Here is the basic type: <xs:complexType name="ui-info-base-type"> <xs:sequence> <xs:element ref="adf:description" minOccurs="0"/> <xs:element ref="adf:display-name" minOccurs="0"/> <xs:element ref="adf:icon" minOccurs="0"/> </xs:sequence> </xs:complexType> And here is the type which extends the basic type: <xs:complexType name="activityType"> <xs:complexContent> <xs:extension base="adf:ui-info-base-type"> <xs:attribute name="id" type="xs:ID" use="required"/> </xs:extension> </xs:complexContent> </xs:complexType> And here is the type which substitute "activityType": <xs:element name="url-view" substitutionGroup="adf:activity"> <xs:complexType> <xs:complexContent> <xs:extension base="adf:activityType"> <xs:sequence> <xs:element name="url" type="adf:expression"/> <xs:element name="url-parameter" type="adf:converted-parameter-type" minOccurs="0" maxOccurs="unbounded"/> </xs:sequence> </xs:extension> </xs:complexContent> </xs:complexType> </xs:element> When Sapphire editor is used to create an "url-view" element, it'd generate the following xml: <url-view id="google"> <url>http://www.google.com</url> <display-name>google</display-name> <description>google</description> <icon> <small-icon>small</small-icon> <large-icon>large</large-icon> </icon> </url-view> Notice <display-name> element is after <url> element. <url> element needs to be after <display-name>, <description> and <icon> elements in the xml.