Forums
New posts
Search forums
Members
Current visitors
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Search forums
Menu
Log in
Register
Install the app
Install
Forums
Archive
Archive
XML
rcase-Recurse with xs:redefine nested groups
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
[QUOTE="Cat, post: 777152"] -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Thu, 27 Jan 2005 13:08:08 +1100, Cat wrote: <snip/> As I seem to understand it the problem is the same as I ran into previously with the removal of 'pointless' xs:sequences. When I remove the second element, through the xs:group reference, the xs:sequence holds only one child and so becomes 'pointless' and is correctly removed at which point the occurance range of the parent group is that of it's child element which is (0,42) when in the original it was (1,1), the default. I haven't worked out a solution yet but adding a dummy element to the group stopping it from being removed does as expected make it validate. ============ BASE =============== <?xml version="1.0"?> <xs:schema targetNamespace="test" xmlns="test" xmlns:xs="[URL]http://www.w3.org/2001/XMLSchema[/URL]"> <xs:element name="root" type="xs:token"/> <xs:group name="groups"> <xs:sequence> <xs:group ref="group1" minOccurs="0" maxOccurs="1"/> <xs:group ref="group2" minOccurs="0" maxOccurs="42" /> <xs:element name="dummy" type="xs:token"/> </xs:sequence> </xs:group> <xs:group name="group1"> <xs:sequence> <xs:element name="one" type="xs:token"/> </xs:sequence> </xs:group> <xs:group name="group2"> <xs:sequence> <xs:element name="two" type="xs:token"/> </xs:sequence> </xs:group> </xs:schema> =========== REDEFINED ============= <?xml version="1.0"?> <xs:schema targetNamespace="test" xmlns="test" xmlns:xs="[URL]http://www.w3.org/2001/XMLSchema[/URL]"> <xs:redefine schemaLocation="test.xsd"> <xs:group name="groups"> <xs:sequence> <xs:group ref="group1" minOccurs="0" maxOccurs="0"/> <xs:group ref="group2" minOccurs="0" maxOccurs="42"/> <xs:element name="dummy" type="xs:token"/> </xs:sequence> </xs:group> </xs:redefine> </xs:schema> - -- Cat [URL]http://www.ratrobot.com/java/beginner/[/URL] An absolute beginners step by step guide on how to use java applets. Thu Jan 27 04:42:45 UTC 2005 -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.4 (GNU/Linux) iD8DBQFB+HFFKHRjYtwQ1QARAq1sAJ98bLRwDq8mgJ15pSLHIcxPBV/wpACeLSdV RZQWrPa1pB1dYmfe0kYJYHQ= =9PbM -----END PGP SIGNATURE----- [/QUOTE]
Verification
Post reply
Forums
Archive
Archive
XML
rcase-Recurse with xs:redefine nested groups
Top