473,802 Members | 2,308 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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="htt p://www.w3.org/2000/01/rdf-schema#"
xmlns:contribut ion="http://www.example.org/#"
xml:base="http://www.example.org/#">

<rdf:Descriptio n rdf:ID="marcrel termmaybe">
<rdf:type rdf:resource="h ttp://www.w3.org/2000/01/rdf-schema#Property "/>
</rdf:Description >

<rdf:Descriptio n rdf:ID="anexamp le">
<contribution:m arcreltermmaybe >Or not
maybe</contribution:ma rcreltermmaybe>
</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 1543
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="htt p://www.w3.org/2000/01/rdf-schema#"
xmlns:contribut ion="http://www.example.org/#"
xml:base="http://www.example.org/#">

<rdf:Descriptio n rdf:ID="marcrel termmaybe">
<rdf:type rdf:resource="h ttp://www.w3.org/2000/01/rdf-schema#Property "/>
</rdf:Description >

<rdf:Descriptio n rdf:ID="anexamp le">
<contribution:m arcreltermmaybe >Or not
maybe</contribution:ma rcreltermmaybe>
</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="htt p://www.w3.org/2000/01/rdf-schema#"
xmlns:contribut ion="http://www.example.org/#"
xml:base="http://www.example.org/#">

<rdf:Descriptio n rdf:ID="marcrel termmaybe">
<rdf:type
rdf:resource="h ttp://www.w3.org/2000/01/rdf-schema#Property "/>
</rdf:Description >

<rdf:Descriptio n rdf:ID="anexamp le">
<contribution:m arcreltermmaybe >Or not
maybe</contribution:ma rcreltermmaybe>
</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:contribut ion="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:m arcreltermmaybe >Or not
maybe</contribution:ma rcreltermmaybe>

My understanding is that contribution:ma rcreltermmaybe
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.u k> wrote:
I would like to be able to dispense with:

xmlns:contribu tion="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 marcreltermmayb e
mean whatever-the-documents-URI-is:marcreltermm aybe, but using
marcreltermmayb e instead of contribution:ma rcreltermmaybe 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.u k> wrote:
I would like to be able to dispense with:

xmlns:contrib ution="http://www.example.org/#"
xml:base="htt p://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 marcreltermmayb e
mean whatever-the-documents-URI-is:marcreltermm aybe, but using
marcreltermmayb e instead of contribution:ma rcreltermmaybe 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.u k> 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:ma rcreltermmaybe to
the URI http://www.example.org/#marcreltermmaybe given the presence of
the namespace declaration xmlns:contribut ion="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
3325
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 schema instance.
0
4229
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> > <password>brown</password> > </userlogin> > Above is my schema instance.
4
2397
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 generate any of the specific instances. sample schema one: <?xml version="1.0" encoding="UTF-8"?> <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified"> <xs:element name="base">
2
1936
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" encoding="UTF-8"?> <xs:schema xmlns:d="http://www.geodesy.org/dam" xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" attributeFormDefault="unqualified"> <xs:element name="River">
2
2500
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 target namespace of the components from the included schema document. I'm confused because of the rules I read in the XML Schema spec <http://www.w3.org/TR/xmlschema-1/#element-element>: > If the <element> element information item has <schema>...
6
2595
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 schema for it with Visual Studio, I get the error "Failed to create a schema for this data file because:
2
7310
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 problem: using System.Diagnostics; using System.IO; using System.Xml; using System.Xml.Schema;
1
6411
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 reference this wsdl in .NET it seems to do it fine, yet there are no objects to reference except RateQuoteBeanService. In the WSDL it looks like there should be getRateQuote, and QUOTEREQUEST, etc.
0
11276
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 information for the". I am using Cassini as the web server on my PCand I can still run my site from within VWD. Does anyone know what I have done to cause these messages to appear? Could not find schema information for the element...
0
10535
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
10282
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10061
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9111
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7598
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6838
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 then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5494
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 last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
2
3792
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2966
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 can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.