XML Schema

From: Date: Wed, 13 Oct 2004 13:17:06 +0000
Subject: XML Schema
Groups: php.soap 
Request: Send a blank email to php-soap+get-1632@lists.php.net to get a copy of this message
Hi folks, I need some help on a XML Schema problem that should be quite easy to solve: I am currently working on a set of identical client, that shall communicate with each other via NuSOAP. They share data from a relational database and I use a XML Schema for mapping the relational to XML data and back. Now I have made a schema and experienced the following problem: imagine you have an element which is of simpleType: <xs:element name="thing" type="xs:string"/> this element shall have an attribute, so I extend the element, making a complexType: <xs:element name="thing" type="xs:string"> <xs:complexType mixed="true">
    <xs:attribute name="info" type="xs:string" use="required"/>
</xs:complexType> </xs:element> My intention was to create a element like this: <thing info="foo">bla</thing> The problem is, my validator tells me, I cannot declare the type "string" to my "thing" anymore, which seems logical because I converted it to a complex type. The mixed="true" ensures that I can fill the element with "bla". So I skipped the type of the element thing. But I need to be sure, that the "bla" is a string anf e.g. no integer. Anyone's got a clue how to get sure the "thing" is a string? thx in advance Stefan

« previous php.soap (#1632) next »