This worked on railo:
<cfsavecontent variable="xs"><?xml version="1.0" encoding="iso-8859-1"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:element name="pur">
<xs:complexType>
<xs:sequence>
<xs:element name="File" type="xs:string"
minOccurs="1" maxOccurs="1"/>
<xs:element name="Data" type="xs:string"
minOccurs="1" maxOccurs="1"/>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:schema></cfsavecontent>
<cfsavecontent variable="xm"><?xml version="1.0" encoding="iso-8859-1"?>
<pur>
<File>foo</File>
<Data>bar</Data>
</pur></cfsavecontent>
<cfdump var="#xmlValidate(xmlParse(xm),xs)#">
<cfabort>
Note how I referred to the schema (it's the actual string content).
:Den
--
But a science is exact to the extent that its method measures up to
and is adequate to its object.
Gabriel Marcel
On Mon, Jul 12, 2010 at 4:17 PM, Ian Skinner wrote:
>
> Small sample files that produce the error.
>
> XML Schema
>
> |<?xml version="1.0" encoding="iso-8859-1"?>
> <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
> <xs:element name="pur">
> <xs:complexType>
> <xs:sequence>
>
> <xs:element name="File" type="xs:string" minOccurs="1"
> maxOccurs="1"/>
>
> <xs:element name="Data" type="xs:string" minOccurs="1"
> maxOccurs="1"/>
>
> </xs:sequence>
> </xs:complexType>
> </xs:element>
> </xs:schema>
> |
>
> XML Test FIle
>
> |<?xml version="1.0" encoding="iso-8859-1"?>
> <pur>
> <File>foo</File>
> <Data>bar</Data>
> </pur>
> |
>
> These file, and the large files I provided previously will validate
> correctly according to this tool.
>
> http://tools.decisionsoft.com/schemaValidate/
>
>
>
>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology-Michael-Dinowitz/dp/1430272155/?tag=houseoffusion
Archive:
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:335277
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm