[
Lists Home |
Date Index |
Thread Index
]
On Sat, 2003-10-25 at 12:17, Robert Koberg wrote:
> Hi,
>
> I was wondering how something like this would be represented in RNG:
>
> <xs:complexType name="SiteNode">
> <xs:sequence>
> <xs:group ref="lsb:core.elems"/>
> </xs:sequence>
> <xs:attributeGroup ref="lsb:navigable.attrs"/>
> </xs:complexType>
>
> <xs:element name="folder">
> <xs:complexType>
> <xs:complexContent>
> <xs:extension base="lsb:SiteNode">
> <xs:sequence>
> <xs:group ref="lsb:folder.elems"/>
> </xs:sequence>
> </xs:extension>
> </xs:complexContent>
> </xs:complexType>
> </xs:element>
>
> Does RNG support extending elements like above?
Yes, since RNG patterns handle both elements and attributes, you can do
extension just by referencing the base definition. In compact syntax:
SiteNode = core.elems, navigable.attrs
folder = element folder { SiteNode, folder.elems }
James
|