xsl-list
[Top] [All Lists]

RE: [xsl] Help deciphering someone else's XML schema

2006-04-04 15:29:12
I'm looking at some XSLT and XSD code from another company. 

The fact that you have some XSLT code doesn't make this an XSLT question or
make it on-topic for this list... 

<rr:CReport xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
xmlns:rr="urn:Correlagen:RightReport"
xmlns:ss="urn:schemas-microsoft-com:office:spreadsheet"
xsi:schemaLocation="urn:Correlagen:RightReport">

I'm a little rusty (well, very rusty) with the XML, XSD and 
XSLT namespaces,
and could use a little help deciphering that line.

This start tag contains three namespace declarations. The "rr" namespace is
needed because it's used in the element name. The "xsi" namespace is needed
because it's used in the attribute name. The "ss" namespace isn't obviously
needed on this start tag, but it's probably used somewhere deeper in the
content, judging from the fact that there's an "ss:Type" mentioned later on.

xsi:schemaLocation tells the system where to find a schema. In this case,
however, it's incorrect. It's supposed to contain a pair of URIs: first a
namespace URI (urn:Correlagen:RightReport) and then a location URI that says
where the schema for that namespace is to be found. The location URI is
missing, which is an error. You should raise this with the document
originator. 

When I take that file and put it into EditiX, and create a 
Schema (.xsd)
file, I get some errors with validation.

If you asked EditiX to create a schema, then I would expect it to create a
schema that the instance is valid against. You seem to be suggesting that it
has created a schema which defines the ss:Type attribute to be an xs:NCName,
when actually there's an ss:Type attribute that isn't an xs:NCName. Unless
I've read your post incorrectly, this would suggest a bug in the EditiX
schema generator, which you should report.

Michael Kay
http://www.saxonica.com/



--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--

<Prev in Thread] Current Thread [Next in Thread>