W3C home > Mailing lists > Public > xmlschema-dev@w3.org > July 2005

Restricting mixed content .....

From: Hämmer Wolfgang <Wolfgang.Haemmer@swx.com>
Date: Tue, 5 Jul 2005 11:21:56 +0200
Message-ID: <AB7C019E505B9F4D95F6B6303A215C7C14314A@CIWMEXZSA0E.ex.ordersx.org>
To: <xmlschema-dev@w3.org>

Dear all,

is there a way to restrict mixed content.

For example:

<Element Element2Attributes="Headers">
	<Element Element2Attributes="Header">public string code (string l_p1, string l_p2) { return l_first + l_p1 + l_second + l_p2 + l_third;}
		<Element Element2Attributes="LocalVariables">
			<Element Element2Attributes="l_first">
can be described as ...

<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified">
	<xs:element name="Element">
		<xs:complexType mixed="true">
			<xs:choice minOccurs="0" maxOccurs="unbounded">
				<xs:element ref="Element"/>
			<xs:attribute name="Element2Attributes" use="required">
					<xs:restriction base="xs:NMTOKEN">
						<xs:enumeration value="Header"/>
						<xs:enumeration value="LocalVariables"/>
						<xs:enumeration value="l_first"/>
			<xs:attribute name="Content" type="xs:string"/>

I would like to be able to restrict  public string code (string l_p1, string l_p2) { return l_first + l_p1 + l_second + l_p2 + l_third;}
using a regexp to public string code(.+).

I have not found anything in the docu. Thanks a lot for your help!

Kinds regards, Wolf
>  -----Original Message-----
> From: 	Hämmer Wolfgang  
> Sent:	Mittwoch, 22. Juni 2005 17:21
> To:	'xmlschema-dev@w3.org'
> Subject:	NewBie Question
> Hello,
> this is something I wanted to ask for a long time ....
> Is there a way using a xml schema to describe an element which name changes as in ...
> 			<TableDrop>
> 				public string code (string l_p) { 
> 					return l_first + l_p + l_second + l_p + l_third;
> 				}	
> 				<LocalVariables>
> 					<l_first>
>    						 aString =  _T(&quot;drop table </l_first>
> 					<l_second>
> 						&quot;); hr = Oc.Execute( aString );
>    						 if ( FAILED(hr) ) _tprintf(_T(&quot;Oc.Execute drop table failed with EBSc_TAB_</l_second>
> 					<l_third>
> 						&quot;));
> 					</l_third>
> 				</LocalVariables>
> 			</TableDrop>
> 			<Sizes>
> 				public string code (string l_p) { return l_start + l_p + l_end;}
> 				<LocalVariables>
> 					<l_start>//TYPEDEF[attribute::name=</l_start>
> 					<l_end>]/attribute::size</l_end>
> 				</LocalVariables>
> 			</Sizes>
> The elements TableDrop and Sizes have the same structure but bear different names.
> I would like to write something like ....
> 	<xs:element name='.*'>
>      	<xs:complexType>
>                <xs:sequence>
>           		<xs:element name="LocalVariables" minOccurs="1" maxOccurs="1">
> 			     	<xs:complexType>
>                			<xs:sequence>
>           					<xs:element name="l_start" minOccurs="1" maxOccurs="1">
>           					<xs:element name="l_end" minOccurs="1" maxOccurs="1">
> 			               <xs:sequence>
> 					</xs:complexType>
> 				</xs:element>
>                <xs:sequence>
> 		</xs:complexType>
> 	</xs:element>
> Thanks for your help!
> Kind regards, Wolf
This message is for the named person's use only. It may contain confidential, proprietary or legally privileged information. No confidentiality or privilege is waived or lost by any mistransmission. If you receive this message in error, please notify the sender urgently and then immediately delete the message and any copies of it from your system. Please also immediately destroy any hardcopies of the message. You must not, directly or indirectly, use, disclose, distribute, print, or copy any part of this message if you are not the intended recipient. The sender's company reserves the right to monitor all e-mail communications through their networks. Any views expressed in this message are those of the individual sender, except where the message states otherwise and the sender is authorised to state them to be the views of the sender's company.
Received on Tuesday, 5 July 2005 09:22:01 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 23:15:29 UTC