You are viewing a plain text version of this content. The canonical link for it is here.
Posted to general@xml.apache.org by Rajan Gupta <ra...@rocketmail.com> on 2001/07/04 04:06:14 UTC

XMLSchema: Problem with

Hi! All,
I want to create a document which allows the instance to have any
elements which the author wants to have in his document e.g.

<?xml version="1.0"?>
<xsd:schema ..../>

<xsd:element name="Application" minOccurs='1' maxOccurs='1'>
  <xsd:sequence>
   <xsd:element name="Host" type="xsd:string"/>
   <xsd:any minOccurs='0'/>
  </xsd:sequence>
</xsd:element>

I would like the above schema to validate the following type of
instance documents: I do not know what the creator of the document
might use as the name of the next after element it could be "any" name
he chooses to have. After reading the specs I thougt <xsd:any> will do
the trick, but Xerces-J 2.1.0 does not behave as I expected it to. 

Am I misunderstanding <xsd:any>, if yes (which is most likely true:),
can anyone tell me how to do it.

<Application>
  <Host>asterix</Host>
  <Port>1490</Port>
</Application>

or even 
<Application>
  <Host>asterix</Host>
  <SocketPort>1490</SocketPort>
</Application>





__________________________________________________
Do You Yahoo!?
Get personalized email addresses from Yahoo! Mail
http://personal.mail.yahoo.com/

---------------------------------------------------------------------
In case of troubles, e-mail:     webmaster@xml.apache.org
To unsubscribe, e-mail:          general-unsubscribe@xml.apache.org
For additional commands, e-mail: general-help@xml.apache.org