[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: xml schema trouble
Ian, XML Schema is not as mature as XSLT, so even though there is a syntax for what you propose to do it won't have any effect for now. You need to install an XML Schema processing tool such as MSXML4, XSV or an eval copy of XML Spy, and initiate validation explicitly. The syntax for suggesting (but only suggesting - the reader chooses what to validate a message against, not the writer) is to add an XSI schemalocation attribute (see http://www.w3.org/TR/2001/REC-xmlschema-0-20010502/#schemaLocation) to your root node, eg <myRoot xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="AccountClosureDetails.xsd"> or <purchaseReport xmlns="http://www.example.com/Report" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.example.com/Report http://www.example.com/Report.xsd"> You will find the primer (http://www.w3.org/TR/xmlschema-0/) very helpful, also the tutorial by Roger Costello at http://www.xfront.com/xml-schema.html Francis. Ian Rogers wrote: > > hi list > > I am quite xml schemas and is having a bit of trouble > > i have written an XML and XSL document and have created a schema to go with > the xml, but my problem is, how do i validate my xml document against the > schema i have written, > > what code do i need to add to the start of the xml document after these > lines > <?xml version="1.0" encoding="ISO8859-1" ?> > <?xml-stylesheet type="text/xsl" href="trans.xsl"?> > > many thanks > > Ian > > ----------------------------------------------------------------- > The xml-dev list is sponsored by XML.org <http://www.xml.org>, an > initiative of OASIS <http://www.oasis-open.org> > > The list archives are at http://lists.xml.org/archives/xml-dev/ > > To subscribe or unsubscribe from this elist use the subscription > manager: <http://lists.xml.org/ob/adm.pl>
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|