XML Schema import statements

I

Iain Robinson

Hi all,

I'm pretty new to schemas and i've been using Oxygen XML editor to
generate and associate XSD files from my own XML files. The results are
pretty simple but there is one aspect thats confusing me.

In my sample xml file i have certain elements that i wish to be treated
as xhtml by a browser (<title> tags are 1 example) and xlinks -- I've no
trouble about associating these with the relevant namespaces but when i
generate a schema file i get the lines

<xsd:import namespace="http://www.w3.org/1999/xhtml"
SchemaLocation="xhtmlxsd"/>

<xsd:import namespace="http://www.w3.org/1999/xlink"
schemaLocation="xlinkxsd"/>


where xhtmlxsd and xlinkxsd are local files on my pc - containing
schemas for the parts of the xhtml and xlink (libraries?) i've used.

My question is - can i not refer to a non-local version of the full
xhtml and xlink libraries and how would i do this (i.e what are the
correct urls) -- or -- have i got totally the wrong idea?

cheers

P@
 
M

Martin Honnen

Iain said:
In my sample xml file i have certain elements that i wish to be treated
as xhtml by a browser (<title> tags are 1 example) and xlinks -- I've no
trouble about associating these with the relevant namespaces but when i
generate a schema file i get the lines

<xsd:import namespace="http://www.w3.org/1999/xhtml"
SchemaLocation="xhtmlxsd"/>

<xsd:import namespace="http://www.w3.org/1999/xlink"
schemaLocation="xlinkxsd"/>


where xhtmlxsd and xlinkxsd are local files on my pc - containing
schemas for the parts of the xhtml and xlink (libraries?) i've used.

My question is - can i not refer to a non-local version of the full
xhtml and xlink libraries and how would i do this (i.e what are the
correct urls) -- or -- have i got totally the wrong idea?

It is of course possible to use an absolute URL as the value of the
schemaLocation attribute. As for which URLs to use last time I looked I
couldn't find anything official on XLink. As for XHTML the XHTML
modularization specification at
http://www.w3.org/TR/xhtml-modularization/schema_module_defs.html#a_schema_module_defs
promises "This appendix will contain implementations of the modules
defined in XHTML Abstract Modules via XML Schema [XMLSCHEMA] when XML
Schema becomes a W3C Recommendation." but so far despite XML Schema
being a W3C recommendation for some years there doesn't seem to be a
schema published for XHTML.
 
P

Priscilla Walmsley

Hi,

For XHTML, there is a spec out there at:

http://www.w3.org/TR/xhtml1-schema/

that refers to 3 schemas:
http://www.w3.org/2002/08/xhtml/xhtml1-strict.xsd
http://www.w3.org/2002/08/xhtml/xhtml1-transitional.xsd
http://www.w3.org/2002/08/xhtml/xhtml1-frameset.xsd

You could use one of these URLs. I've never used these schemas; I'm not
sure how well they work.


For XLink, I don't know of anything formal from the W3C, but there are
several on the web, including the one at:

http://www.oasis-open.org/committees/ebxml-msg/schema/xlink.xsd

Hope that helps,
Priscilla
 
I

Iain Robinson

Cheers for these - they <seemed> to be exactly what i was looking for --
the xlink schema worked fine but the xhtml schemas seem to contain a few
errors (a couple of invalid regular expressions by the looks of it) so i
t looks like i cant use them

Thanks anyway

P@
 
H

Henry S. Thompson

Iain Robinson said:
Cheers for these - they <seemed> to be exactly what i was looking for --
the xlink schema worked fine but the xhtml schemas seem to contain a
few errors (a couple of invalid regular expressions by the looks of
it) so i t looks like i cant use them .. . .

XSV doesn't report any errors in those schema documents (but it
doesn't do much regexp checking) -- please let me know what validator
you were using and what errors it reported, so they can be fixed.

Thanks

ht
--
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: (e-mail address removed)
URL: http://www.ltg.ed.ac.uk/~ht/
[mail really from me _always_ has this .sig -- mail without it is forged spam]
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,057
Latest member
KetoBeezACVGummies

Latest Threads

Top