473,498 Members | 1,785 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

XML Schema import statements

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@
Jul 20 '05 #1
4 3258


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-modulariz...ma_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/
Jul 20 '05 #2
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...hema/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!
Jul 20 '05 #3
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...hema/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!

Jul 20 '05 #4
Iain Robinson <ip****@o2.co.uk> 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: 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]
Jul 20 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
4150
by: Dennis B. Hansen | last post by:
Hi all... I'm having some problems JAXB compiling som schemas, and was wondering if what i was trying to do is simply wrong... the problem seems to be with my import statements, and I've tried...
2
4639
by: Olaf Meyer | last post by:
Apprentently xerces 2.6.0 (Java) does not validate against contraints specified in the schema (e.g. constraints specified via unique element). The validation works with the XML editor I'm using...
0
1378
by: Andy Dingley | last post by:
I'm writing XSLT to transform fntg-schema (our own project's document schema) into PartnerML, a HTML-like XML dialect used for mobile phones. I'm using XMLSPy 4.4 to do this. The schema for...
4
2368
by: Gordon Dickens | last post by:
I have target xml to generate from schema. All of the XML instances have the same global element i.e. <base>. I would like to combine all of the schemas into a single schema where I could...
2
2465
by: Stanimir Stamenkov | last post by:
I'm trying to find out if it is permissible to include a schema document with absent target namespace to a schema with specified target namespace, and if it is, what are the rules to resolve the...
4
2472
by: Iain A. Mcleod | last post by:
Hi I'm stuck with the following schema validation problem in VS.NET 2003: I have two types of xml document and related schema: project and projectCollection. A projectcollection is just a set...
1
6376
by: billa1972 | last post by:
Hi, I am trying to hook into Yellow Freight's rating webservice. Below is the wsdl. When i try and create a proxy file with wsdl.exe i get the following errors, see below. Also, when i...
5
5372
by: Jeff | last post by:
We are using .Net and the wsdl Utility to generate proxies to consume web services built using the BEA toolset. The data architects on the BEA side create XML schemas with various entities in...
1
2147
by: bhaumik | last post by:
I am trying to validate an XML document using MSXML against a schema that contains 4 import statements to additional .xsd files. The code is written in C/C++. MSXML seems to work ok if I use a...
0
7121
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7197
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
6881
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
7375
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
5456
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
4584
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3088
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
1
650
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
287
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.