XML Schema import statements

Discussion in 'XML' started by Iain Robinson, Nov 7, 2004.

  1. 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@
     
    Iain Robinson, Nov 7, 2004
    #1
    1. Advertising

  2. Iain Robinson wrote:

    > 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.


    --

    Martin Honnen
    http://JavaScript.FAQTs.com/
     
    Martin Honnen, Nov 7, 2004
    #2
    1. Advertising

  3. 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
    -----------------------------------------------------
    Priscilla Walmsley
    Author, Definitive XML Schema (Prentice Hall PTR)
    http://www.datypic.com
    -----------------------------------------------------

    *** Sent via Developersdex http://www.developersdex.com ***
    Don't just participate in USENET...get rewarded for it!
     
    Priscilla Walmsley, Nov 8, 2004
    #3
  4. 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@


    Priscilla Walmsley wrote:
    > 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
    > -----------------------------------------------------
    > Priscilla Walmsley
    > Author, Definitive XML Schema (Prentice Hall PTR)
    > http://www.datypic.com
    > -----------------------------------------------------
    >
    > *** Sent via Developersdex http://www.developersdex.com ***
    > Don't just participate in USENET...get rewarded for it!
     
    Iain Robinson, Nov 8, 2004
    #4
  5. Iain Robinson <> writes:

    > 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

    .. . .
    >> 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


    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:
    URL: http://www.ltg.ed.ac.uk/~ht/
    [mail really from me _always_ has this .sig -- mail without it is forged spam]
     
    Henry S. Thompson, Nov 26, 2004
    #5
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Markus
    Replies:
    1
    Views:
    1,554
    Markus
    Nov 23, 2005
  2. Dennis B. Hansen

    Schema import statements

    Dennis B. Hansen, Aug 4, 2003, in forum: XML
    Replies:
    1
    Views:
    488
    Mike Grayson
    Aug 11, 2003
  3. Stanimir Stamenkov
    Replies:
    3
    Views:
    1,270
    Stanimir Stamenkov
    Apr 25, 2005
  4. Vitali Gontsharuk
    Replies:
    2
    Views:
    570
    Vitali Gontsharuk
    Aug 25, 2005
  5. Replies:
    3
    Views:
    2,876
Loading...

Share This Page