[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Substituting elements in a group for the group when redefining

  • From: "Allison Bloodworth" <abloodworth@b...>
  • To: <xml-dev@l...>
  • Date: Mon, 2 Oct 2006 18:33:53 -0700

element ref minoccurs
Hi, 

I tried to search the archives at http://lists.xml.org/archives/xml-dev/ on
this but got a message saying: The requested URL /cgi-bin/htsearch was not
found on this server. I also did a search of the internet but unfortunately
am having trouble finding info on this situation the XML Schema spec.

I would like to redefine an element (PublicEventContactType) that is defined
in a schema as containing a group called ContactInfo. I don't want to
redefine the group itself, as those changes would apply to a lot of other
elements where I don't want the change made, but just within this
PublicEventContactType element itself. You would think that this would be
something that XML Schema would support, but I am getting an error message
from XML Spy 2005 saying, "The content model of complex type
'ev:PublicEventContactType' is not a valid restriction of the content model
of complex type 'ev:PublicEventContactType' and a similar error in Oxygen
6.2. 

Is this really not possible? You would think I could substitute the elements
in the group for the group in the redefine...I do understand that I could
remove them here and put them back in in an extension, but that would
require another schema.

Original:
	<xs:group name="ContactInfo">
		<xs:sequence>
			<xs:element ref="ev:ContactName" minOccurs="0"/>
			<xs:element ref="ev:ProfessionalAffiliations"
minOccurs="0"/>
			<xs:element ref="ev:Phones" minOccurs="0"/>
			<xs:element ref="ev:EmailAddresses" minOccurs="0"/>
			<xs:element ref="ev:Addresses" minOccurs="0"/>
			<xs:element ref="ev:WebPages" minOccurs="0"/>
			<xs:element ref="ev:PreferredContactMethod"
minOccurs="0"/>
		</xs:sequence>
	</xs:group>
	<xs:complexType name="PublicEventContactType">
		<xs:sequence>
			<xs:element ref="ev:PublicEventContactID"
minOccurs="0"/>
			<xs:group ref="ev:ContactInfo" minOccurs="0"/>
			<xs:element ref="ev:PublicEventContactTypes"
minOccurs="0"/>
			<xs:element ref="ev:PublicEventContactParentID"
minOccurs="0">
		</xs:sequence>
	</xs:complexType>

Redefine:
		<xs:complexType name="PublicEventContactType">
			<xs:complexContent>
				<xs:restriction
base="ev:PublicEventContactType">
					<xs:sequence>
						<!-- REMOVING THIS ELEMENT
<xs:element ref="ev:PublicEventContactID" minOccurs="0"/> -->
						<xs:element
ref="ev:ContactName" minOccurs="0"/>
						<xs:element
ref="ev:ProfessionalAffiliations" minOccurs="0"/>
						<xs:element ref="ev:Phones"
minOccurs="0"/>
						<xs:element
ref="ev:EmailAddresses" minOccurs="0"/>
						<xs:element
ref="ev:Addresses" minOccurs="0"/>
						<!-- REMOVING THIS ELEMENT
<xs:element ref="ev:WebPages" minOccurs="0"/> -->
						<xs:element
ref="ev:PreferredContactMethod" minOccurs="0"/>
						<!-- REMOVING THIS ELEMENT
<xs:element ref="ev:PublicEventContactTypes" minOccurs="0">
						</xs:element> -->
						<!-- REMOVING THIS ELEMENT
<xs:element ref="ev:PublicEventContactParentID" minOccurs="0">
						</xs:element> -->
					</xs:sequence>
				</xs:restriction>
			</xs:complexContent>
		</xs:complexType> 

Thanks for your help,

Allison Bloodworth
Principal Administrative Analyst
Technology Program Office
University of California, Berkeley
(415) 377-8243
abloodworth@b...





[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index]


PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
 

Stylus Studio has published XML-DEV in RSS and ATOM formats, enabling users to easily subcribe to the list from their preferred news reader application.


Stylus Studio Sponsored Links are added links designed to provide related and additional information to the visitors of this website. they were not included by the author in the initial post. To view the content without the Sponsor Links please click here.

Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.