[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: xml schema trouble

  • From: Francis Norton <francis@r...>
  • To: Ian Rogers <ian.rogers@n...>
  • Date: Fri, 14 Sep 2001 11:49:22 +0100

iso8859 1 xml spy
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!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
 

Stylus Studio has published XML-DEV in RSS and ATOM formats, enabling users to easily subcribe to the list from their preferred news reader application.


Stylus Studio Sponsored Links are added links designed to provide related and additional information to the visitors of this website. they were not included by the author in the initial post. To view the content without the Sponsor Links please click here.

Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.