Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


Re: XSD schemas and HTML

From: questions@---------.------
To: NULL
Date: 8/1/2005 8:01:00 AM
Unfortunately, with XSD set to:

				<xs:element name="Description" minOccurs="0">
					<xs:complexType mixed="true">
						<xs:sequence>
							<xs:any namespace="http://www.w3.org/1999/xhtml" 
processContents="lax" maxOccurs="unbounded"/>
						</xs:sequence>
						<xs:attribute name="ReadFromDB" type="xs:boolean" use="required"/>
						<xs:attribute name="id" type="xs:integer" use="required"/>
					</xs:complexType>
				</xs:element>


the validator in XMLSpy won't let me have the following XML:
	<Description ReadFromDB="true" id="8">I have read the following. I confirm 
the following: 
<ol xmlns="http://www.w3.org/1999/xhtml">
			<li xmlns="http://www.w3.org/1999/xhtml">No Exception:  OR</li>
			<li xmlns="http://www.w3.org/1999/xhtml">Exception:</li>
		</ol>
		Details of changes/adjustments:
		<p xmlns="http://www.w3.org/1999/xhtml"></p>
Please document the following:<br xmlns="http://www.w3.org/1999/xhtml"/>
It won't let me have the above p tags.  I can't have a second ol or ul 
element either!<br xmlns="http://www.w3.org/1999/xhtml"/>
Please help!
</Description>

"Martin Honnen" wrote:

> 
> 
> Patrick wrote:
> 
> > Many Thanks, but how could I alter the XSD to allow the following example XML 
> > instance (i.e. multiple tags)?:
> > 
> > <!-----------------------Start of test.xml----------------------->
> > <?xml version="1.0" encoding="UTF-8"?>
> > <FormDefinition xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
> > xsi:noNamespaceSchemaLocation="Test.xsd">
> > 	<FormName FormTypeAttrib="XX">test</FormName>
> > 	<Description>
> > <p>can i have more than one of these tags</p>
> > <p>like this second p tag here?</p>
> > can i also have a few br tags formatted either like this: <br/> 
> > or <br></br>?
> > </Description>
> > </FormDefinition>
> 
> You could use
> 
> <Description>
> <p xmlns="http://www.w3.org/1999/xhtml">can i have more than one of 
> these tags</p>
> <p xmlns="http://www.w3.org/1999/xhtml">like this second p tag here?</p>
> can i also have a few br tags formatted either like this: <br 
> xmlns="http://www.w3.org/1999/xhtml"/>
> or <br xmlns="http://www.w3.org/1999/xhtml"></br>?
> </Description>
> 
> if the schema says
> 
> <xs:element name="Description">
>    <xs:complexType mixed="true">
>      <xs:sequence>
>        <xs:any processContents="lax"
>                maxOccurs="unbounded"
>                namespace="http://www.w3.org/1999/xhtml" />
>      </xs:sequence>
>    </xs:complexType>
> </xs:element>
> 
> 
> -- 
> 
> 	Martin Honnen --- MVP XML
> 	http://JavaScript.FAQTs.com/
> 


transparent
Print
Mail
Like It
Disclaimer
.

These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.

.
.

transparent

transparent