[XSL-LIST Mailing List Archive Home] [By Thread] [By Date]

Re: [xsl] XSL and XMLSchema


Subject: Re: [xsl] XSL and XMLSchema
From: Francis Norton <francis@xxxxxxxxxxx>
Date: Fri, 27 Apr 2001 13:51:38 +0100


Karim Barkati wrote:
> 
> I am new to these things, but I'm involved in a project of musical
> representation for the web. I'd like to describe datas with an xmlschema
> and their representation with a style sheet, but I don't know whether it
> is possible. I know I could use a dtd and a xsl, but xmlschema seems to
> be more powerful, so here is my question:
> is it possible to apply an xsl to an xmlschema?


Karim,

You can use either an XML Schema or a DTD to specify vality and default
rules for a type of XML document. Since XML Schema is basically a
superset of DTD, you can (if you're careful) write XML Schemas and DTDs
that define exactly the same type of document. In fact tools like XML
Spy can convert a DTD into the equivalent schema.

Once you've defined your document type you can then write an XSLT
transform to process documents of that type. In other words if
myMusix.xsd is your schema, and defines XML docs with elements like
<music/>, <bar/> and <note/>, then your XSLT can assume that those
elements will be in its input.

So the design of the stylesheet depends on the document type, but not on
the choice of DTD or XML Schema for defining that type. 

I hope this helps!

Francis.

 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list



Current Thread