W3C home > Mailing lists > Public > xmlschema-dev@w3.org > October 2001

Re: schema not working

From: Eddie Robertsson <eddie@allette.com.au>
Date: Thu, 11 Oct 2001 09:50:26 +1000
Message-ID: <3BC4DEC2.D99CB2A@allette.com.au>
To: Jeni Tennison <jeni@jenitennison.com>
CC: Ian Rogers <ian.rogers@net800.co.uk>, Xml Schema <xmlschema-dev@w3.org>
> I think that the main problem is that you haven't got the correct URL
> for the XMLSchema-instance namespace. It should be:
>
>   http://www.w3.org/2001/XMLSchema-instance
>                        ^^^ no /10/
>
> Then you need to sort out what the location of the schema that you're
> pointing to is from the instance document. I think it's trans.xsd in
> the same directory as the instance document.
>
> Now, you aren't using a namespace for the elements in your document
> (e.g. the transactions element) and from your previous post, your
> schema doesn't have a target namespace, so you need to use the
> xsi:noNamespaceSchemaLocation attribute, and its value needs to be the
> (relative) URI pointing to the schema.
>
> So the start tag of the transactions element in your instance document
> should look like:
>
> <transactions xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>               xsi:noNamespaceSchemaLocation="trans.xsd">
> ...
> </transactions>
>
> *However* I don't think that this has anything to do with the XML
> document not being transformed with the XSLT stylesheet. As far as I
> can see, you haven't given IE any pointer to the XSLT stylesheet that
> you want to use with the document. You need an xml-stylesheet
> processing instruction at the top of your instance document, something
> like:
>
> <?xml-stylesheet type="text/xsl" href="trans.xsl"?>
> <transactions xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>               xsi:noNamespaceSchemaLocation="trans.xsd">
> ...
> </transactions>
>
> That tells IE to use trans.xsl to transform the instance document.
>
> Also, IE6 doesn't use MSXML4 unless you do the
> validation/transformation using a script. If you're just loading in
> the XML document, IE6 won't validate automatically against an XML
> Schema schema (only against an XDR schema).
>
> I hope that's some help,

I can't contribute much to what Jeni have already said but you might want to
check out the MSXML4 newsgroup (microsoft.public.xml.msxml-webrelease) with
specific questions about validation with MSXML4 and IEx.

Cheers,
/Eddie
Received on Wednesday, 10 October 2001 19:42:38 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 11 January 2011 00:14:24 GMT