f



Example of an XML document with an inline xml schema

Hi All,

I'm looking for a little example of an xml document which is validated
using an inline xml schema.  I'm a bit of a newbie, and I'm finding
this to be a bit of a mind bender, so an example or some pointers which
show me how to achieve this would be much appreciated.

I look forward to any help or advice any one can offer.

Naran

0
12/12/2005 9:33:37 PM
comp.text.xml 8781 articles. 0 followers. Post Follow

4 Replies
761 Views

Similar Articles

[PageSpeed] 51

Here's a trivial example

<arbitrarytag xmlns:xs="http://www.w3.org/2001/XMLSchema"
              xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
              xsi:noNamespaceSchemaLocation="#local">
 <xs:schema id="local">
  <xs:element name="root" type="xs:integer"/>
 </xs:schema>
 <root>35a</root>
</arbitrarytag>

At least XSV [1] will process this in the desired way.

ht

[1] http://www.ltg.ed.ac.uk/~ht/xsv-status.html
-- 
 Henry S. Thompson, HCRC Language Technology Group, University of Edinburgh
                     Half-time member of W3C Team
    2 Buccleuch Place, Edinburgh EH8 9LW, SCOTLAND -- (44) 131 650-4440
            Fax: (44) 131 650-4587, e-mail: ht@inf.ed.ac.uk
                   URL: http://www.ltg.ed.ac.uk/~ht/
[mail really from me _always_ has this .sig -- mail without it is forged spam]
0
ht1 (120)
12/13/2005 10:07:31 AM
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnxmlnet/html/inlschma.asp

-- 
Stan Kitsis
Program Manager, XML Technologies
Microsoft Corporation

This posting is provided "AS IS" with no warranties, and confers no rights.

"WideBoy" <naran.hirani@gmail.com> wrote in message 
news:1134423216.905629.40370@f14g2000cwb.googlegroups.com...
> Hi All,
>
> I'm looking for a little example of an xml document which is validated
> using an inline xml schema.  I'm a bit of a newbie, and I'm finding
> this to be a bit of a mind bender, so an example or some pointers which
> show me how to achieve this would be much appreciated.
>
> I look forward to any help or advice any one can offer.
>
> Naran
> 


0
skits (64)
12/21/2005 7:10:55 PM
Stan,

I tried using and testing the resource on the page you refer to, but
unfortunately, it too does not seem to work within XMLSpy? It seems
XMLSpy does not like an XML doc that starts with <root> after the XML
PI.  In addition it doesn't seem to like the other suggestions
mentioned at this url.  So still waiting for something works or even
some one to tell me that this sort of thing can not be done in XML
schema.  This would be v. strange and a retrograde step especially as
this is possible in DTDs, so what gives?

Any ideas or suggestions would be much appreciated.

Regards,

Naran

0
12/22/2005 12:30:39 PM
Naran,

Just because one of the tools thinks something is invalid, doesn't mean it 
is.  As Henry Thompson said in his earlier post, complain to the tool vendor 
about the problems.  When it comes to schema-related questions, Henry is 
usually the ultimate authority - after all, he's one of the main people 
behind the W3C Schema spec.

-- 
Stan Kitsis
Program Manager, XML Technologies
Microsoft Corporation

This posting is provided "AS IS" with no warranties, and confers no rights.


"WideBoy" <naran.hirani@gmail.com> wrote in message 
news:1135254639.469872.134120@g14g2000cwa.googlegroups.com...
> Stan,
>
> I tried using and testing the resource on the page you refer to, but
> unfortunately, it too does not seem to work within XMLSpy? It seems
> XMLSpy does not like an XML doc that starts with <root> after the XML
> PI.  In addition it doesn't seem to like the other suggestions
> mentioned at this url.  So still waiting for something works or even
> some one to tell me that this sort of thing can not be done in XML
> schema.  This would be v. strange and a retrograde step especially as
> this is possible in DTDs, so what gives?
>
> Any ideas or suggestions would be much appreciated.
>
> Regards,
>
> Naran
> 


0
skits (64)
12/22/2005 6:42:45 PM
Reply: