Allow xml:space=“preserve” in XSD for validation

amitk1

New Member
I am trying to validate an xml file with a schema i wrote but its failing with the line:\[code\]Element 'Route', attribute '{http://www.w3.org/XML/1998/namespace}space': The attribute '{http://www.w3.org/XML/1998/namespace}space' is not allowed.\[/code\]the XML file sometimes contains this:\[code\] <Route xml:space="preserve"></Route>\[/code\]which is obviously causing the problem, what can i do to my xsd file to allow for this? Here is my XSD with everything non relevant removed\[code\]<?xml version="1.0" standalone="yes"?><xs:schema id="NewDataSet" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:msdata="http://stackoverflow.com/questions/11224203/urn:schemas-microsoft-com:xml-msdata"> <xs:element name="NewDataSet"> <xs:element name="Route" type="xs:string" minOccurs="0" /> <xs:element name="FurtherRequirements" type="xs:string" minOccurs="0" />\[/code\]etc. etc.All help gratefully received!
 
Back
Top