473,385 Members | 1,753 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

test schema namespace

Hi, I'm wondering if it's possible for a document to
contain a namespace which is a self-reference.

e.g. in the following:
<?xml version="1.0"?>
<!DOCTYPE rdf:RDF [<!ENTITY xsd "http://www.w3.org/2001/XMLSchema#">]>
<rdf:RDF
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#"
xmlns:contribution="http://www.example.org/#"
xml:base="http://www.example.org/#">

<rdf:Description rdf:ID="marcreltermmaybe">
<rdf:type rdf:resource="http://www.w3.org/2000/01/rdf-schema#Property"/>
</rdf:Description>

<rdf:Description rdf:ID="anexample">
<contribution:marcreltermmaybe>Or not
maybe</contribution:marcreltermmaybe>
</rdf:Description>

</rdf:RDF>

Description ends up as part of the contribution namespace,
because the base is the same. Is there any way to dispense
with the fictional www.example.org and make the namespace
point to the document itself? (I know this defeats the
point of a persistent namespace, but this is for purposes
of validating a test schema).

--
imalone
Oct 27 '05 #1
5 1519
Ian Malone wrote:
Hi, I'm wondering if it's possible for a document to
contain a namespace which is a self-reference.
I do not understand?
namespace wich is a self reference??


e.g. in the following:
<?xml version="1.0"?>
<!DOCTYPE rdf:RDF [<!ENTITY xsd "http://www.w3.org/2001/XMLSchema#">]>
<rdf:RDF
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#"
xmlns:contribution="http://www.example.org/#"
xml:base="http://www.example.org/#">

<rdf:Description rdf:ID="marcreltermmaybe">
<rdf:type rdf:resource="http://www.w3.org/2000/01/rdf-schema#Property"/>
</rdf:Description>

<rdf:Description rdf:ID="anexample">
<contribution:marcreltermmaybe>Or not
maybe</contribution:marcreltermmaybe>
</rdf:Description>

</rdf:RDF>

Description ends up as part of the contribution namespace,
because the base is the same. Is there any way to dispense
with the fictional www.example.org and make the namespace
point to the document itself? (I know this defeats the
point of a persistent namespace, but this is for purposes
of validating a test schema).


A namespace is nothing more that a name, it does not point to a document.

I do not really understand what youre asking, can further explain your
problem?
Oct 27 '05 #2
Tjerk Wolterink wrote:
Ian Malone wrote:
Hi, I'm wondering if it's possible for a document to
contain a namespace which is a self-reference.

I do not understand?
namespace wich is a self reference??


e.g. in the following:
<?xml version="1.0"?>
<!DOCTYPE rdf:RDF [<!ENTITY xsd "http://www.w3.org/2001/XMLSchema#">]>
<rdf:RDF
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#"
xmlns:contribution="http://www.example.org/#"
xml:base="http://www.example.org/#">

<rdf:Description rdf:ID="marcreltermmaybe">
<rdf:type
rdf:resource="http://www.w3.org/2000/01/rdf-schema#Property"/>
</rdf:Description>

<rdf:Description rdf:ID="anexample">
<contribution:marcreltermmaybe>Or not
maybe</contribution:marcreltermmaybe>
</rdf:Description>

</rdf:RDF>


Description ends up as part of the contribution namespace,
because the base is the same. Is there any way to dispense
with the fictional www.example.org and make the namespace
point to the document itself? (I know this defeats the
point of a persistent namespace, but this is for purposes
of validating a test schema).


A namespace is nothing more that a name, it does not point to a document.

I do not really understand what youre asking, can further explain your
problem?


I would like to be able to dispense with:

xmlns:contribution="http://www.example.org/#"
xml:base="http://www.example.org/#"

in the root element and somehow still have a validating rdf in
xml document containing:
<contribution:marcreltermmaybe>Or not
maybe</contribution:marcreltermmaybe>

My understanding is that contribution:marcreltermmaybe
stands in for
http://www.example.org/#marcreltermmaybe

Thanks for your time.

--
imalone
Oct 27 '05 #3
In article <43************@cam.ac.uk>, Ian Malone <ib***@cam.ac.uk> wrote:
I would like to be able to dispense with:

xmlns:contribution="http://www.example.org/#"
xml:base="http://www.example.org/#"


I don't think you can do this, but you really need to ask in an RDF forum.

Removing the xml:base would make references to ID marcreltermmaybe
mean whatever-the-documents-URI-is:marcreltermmaybe, but using
marcreltermmaybe instead of contribution:marcreltermmaybe as the element
name not do the corresponding thing (I don't see anything in
http://www.w3.org/TR/rdf-syntax-grammar describing the meaning of
an element in no namespace).

No meaning is assigned to relative namespace URIs, otherwise it might
work to use ".".

-- Richard
Oct 27 '05 #4
Richard Tobin wrote:
In article <43************@cam.ac.uk>, Ian Malone <ib***@cam.ac.uk> wrote:
I would like to be able to dispense with:

xmlns:contribution="http://www.example.org/#"
xml:base="http://www.example.org/#"

I don't think you can do this, but you really need to ask in an RDF forum.


Probably, but usenet was my first stop and I couldn't find any
RDF specific groups. I suspect that if XML doesn't allow it
then RDF won't make any provision, because it goes against the
whole idea.
Removing the xml:base would make references to ID marcreltermmaybe
mean whatever-the-documents-URI-is:marcreltermmaybe, but using
marcreltermmaybe instead of contribution:marcreltermmaybe as the element
name not do the corresponding thing (I don't see anything in
http://www.w3.org/TR/rdf-syntax-grammar describing the meaning of
an element in no namespace).

No meaning is assigned to relative namespace URIs, otherwise it might
work to use ".".


That's the impression I got, my knowledge of URIs is poor though,
so I was hoping I'd missed something. Thanks for your help.

--
imalone
Oct 27 '05 #5
In article <43**************@cam.ac.uk>, Ian Malone <ib***@cam.ac.uk> wrote:
I suspect that if XML doesn't allow it
then RDF won't make any provision, because it goes against the
whole idea.


A minor point: the correspondence of contribution:marcreltermmaybe to
the URI http://www.example.org/#marcreltermmaybe given the presence of
the namespace declaration xmlns:contribution="http://www.example.org/#"
is something invented by RDF, not XML.

-- Richard
Oct 27 '05 #6

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

Similar topics

2
by: wooks | last post by:
<?xml version='1.0'?> <userlogin xmlns="urn:faster:userlogin" xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'> <login>mick</login> <password>brown</password> </userlogin> Above is my...
0
by: C. M. Sperberg-McQueen | last post by:
wooks (wookiz@hotmail.com) wrote: > <?xml version='1.0'?> > <userlogin xmlns="urn:faster:userlogin" > xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'> > <login>mick</login> > ...
4
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
by: Zombie | last post by:
Hi all, I wish to create a namespace other than the default one. Let's say, the Schema looks like: ----------------------------------------------------------------------- <?xml version="1.0"...
2
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...
6
by: Martin | last post by:
Hi, I have a xml file like the one below <?xml version="1.0" encoding="utf-8"?><e1 xmlns:e1="http://tempuri.org/Source1.xsd" e1:att1="1" e1:att2="2" e1:rest="345"/> If I try to create a...
2
by: Ali | last post by:
I am having problem compiling schema contained in WSDL file when analyzing schema types contained in it (for example http://www.ebout.net/net/GoogleSearch.wsdl). Following code demonstrates my...
1
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...
0
by: Derek | last post by:
I am creating an intranet using Visual Web Developer Express Edition. Everything has been working OK until yesterday when I started getting 62 messages all beginning "Could not find schema...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
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
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
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...

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.