472,333 Members | 1,024 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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

rookie question - setting a path to a schema

Ian
I would like to set a path to a schema where both the xml file and the
schema are on my local hard drive (e.g. c:\XML\auto.xml and
c:\XML\auto.xsd)

Thank you,

Ian
Jul 20 '05 #1
4 3424
/Ian/:
I would like to set a path to a schema where both the xml file and the
schema are on my local hard drive (e.g. c:\XML\auto.xml and
c:\XML\auto.xsd)


"2.6.3 xsi:schemaLocation, xsi:noNamespaceSchemaLocation"
<http://www.w3.org/TR/xmlschema-1/#xsi_schemaLocation>

Examples:

"5.6 schemaLocation" <http://www.w3.org/TR/xmlschema-0/#schemaLocation>

Note, these provide only a hint to the processor. If you manipulate
the files programmatically, depending on the programming framework
you use, you should be able to control these with processor's
specific calls.

--
Stanimir
Jul 20 '05 #2
Hi Stanimir,

According to the specification:

A schema is not required to have a namespace (see Undeclared Target
Namespaces (§3.4)) and so there is a noNamespaceSchemaLocation
attribute which is used to provide hints for the locations of schema
documents that do not have target namespaces.

In this case the schema does have a namespace, but it is located on a
network or local hard drive. In testing, I have had some success with
http://localhost but that only works if all files are on my local hard
drive and not on the network .... any further thoughts?

Thanks,

Ian
Stanimir Stamenkov wrote:
/Ian/:
I would like to set a path to a schema where both the xml file and the schema are on my local hard drive (e.g. c:\XML\auto.xml and
c:\XML\auto.xsd)
"2.6.3 xsi:schemaLocation, xsi:noNamespaceSchemaLocation"
<http://www.w3.org/TR/xmlschema-1/#xsi_schemaLocation>

Examples:

"5.6 schemaLocation"

<http://www.w3.org/TR/xmlschema-0/#schemaLocation>
Note, these provide only a hint to the processor. If you manipulate
the files programmatically, depending on the programming framework
you use, you should be able to control these with processor's
specific calls.

--
Stanimir


Jul 20 '05 #3
/ia*********@gmail.com/:
A schema is not required to have a namespace (see Undeclared Target
Namespaces (§3.4)) and so there is a noNamespaceSchemaLocation
attribute which is used to provide hints for the locations of schema
documents that do not have target namespaces.

In this case the schema does have a namespace, but it is located on a
network or local hard drive. In testing, I have had some success with
http://localhost but that only works if all files are on my local hard
drive and not on the network .... any further thoughts?
The namespace URI is nothing more but uniquely identifying the
namespace - it doesn't designate the resource of the schema document.

Here:

-----"c:\XML\auto.xsd"

<?xml version="1.0" ?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
targetNamespace="urn:x-ian-test:auto">

<xs:element name="example" type="xs:string" />

</xs:schema>

-----"c:\XML\auto.xml"

<?xml version="1.0" ?>
<example xmlns="urn:x-ian-test:auto"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="urn:x-ian-test:auto auto.xsd">

bla-bla

</example>
There:

<http://www.w3.org/TR/xmlschema-0/#UsingSchemaLocationInQuarterly>:
The schemaLocation attribute value consists of one or more pairs of
URI references, separated by white space. The first member of each
pair is a namespace name, and the second member of the pair is a
hint describing where to find an appropriate schema document for
that namespace.
<http://www.w3.org/TR/xmlschema-1/#schema-loc> (a bit down bellow):
3. On the other hand, in case a document author (human or not)
created a document with a particular schema in view, and warrants
that some or all of the document conforms to that schema, the
'schemaLocation' and 'noNamespaceSchemaLocation' attributes ... are
provided. The first records the author's warrant with pairs of URI
references (one for the _namespace name_, and one for a hint as to
the _location of a schema document_ defining names for that
namespace name).


--
Stanimir
Jul 20 '05 #4
I understand what you are saying now. Appreciate you taking the time to
spell it out for me!

Thank you,

Ian

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Jul 20 '05 #5

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

Similar topics

11
by: Don Bruder | last post by:
Got a stumper here. I imagine that for someone experienced in C++, this is too pathetic for words. For a rookie, using this project as a sort of...
0
by: Prawdziwa Blondynka | last post by:
Hi, I would like to do the following with C++ and Xerces: set the schema path in an XML file to parse in this way: XMLCh* schemaLocation =...
7
by: Andrei Ivanov | last post by:
This happend again, but now, postgresql tells me where it happens: pg_dump: SQL command failed pg_dump: Error message from server: ERROR: did...
2
by: LesleyW | last post by:
I'm using a public set of schemas for GML, avaiable at www.opengis.net/gml. They all include or import each other but live in a folder hierarchy, so...
1
by: Scott | last post by:
I am using the BETA DB2 Provider for .NET and have ran into the following issue. I would like to specify a library list and, for each unqualified...
1
by: phil campaigne | last post by:
On Mon, 1 Mar 2004, phil campaigne wrote: >> Nigel J. Andrews wrote: >> > > >>> >On Mon, 1 Mar 2004, Phil Campaigne wrote: >>> > >>> >
2
by: Mark | last post by:
Hi... I've been trying the .Validate() method on the XmlDocument to validate some xml against a schema, but one thing I noted was that unless the...
4
by: jrett | last post by:
I'm new to ASP.NET and fairly inexperienced with web development in general, but I've been a professional software dev for over 10 years, C++, Unix...
1
by: laredotornado | last post by:
Hi, I'm using PHP 4.4.4 on Apache 2 on Fedora Core 5. PHP was installed using Apache's apxs and the php library was installed to...
0
better678
by: better678 | last post by:
Question: Discuss your understanding of the Java platform. Is the statement "Java is interpreted" correct? Answer: Java is an object-oriented...
0
by: teenabhardwaj | last post by:
How would one discover a valid source for learning news, comfort, and help for engineering designs? Covering through piles of books takes a lot of...
0
by: Kemmylinns12 | last post by:
Blockchain technology has emerged as a transformative force in the business world, offering unprecedented opportunities for innovation and...
0
by: CD Tom | last post by:
This only shows up in access runtime. When a user select a report from my report menu when they close the report they get a menu I've called Add-ins...
0
by: Naresh1 | last post by:
What is WebLogic Admin Training? WebLogic Admin Training is a specialized program designed to equip individuals with the skills and knowledge...
0
jalbright99669
by: jalbright99669 | last post by:
Am having a bit of a time with URL Rewrite. I need to incorporate http to https redirect with a reverse proxy. I have the URL Rewrite rules made...
0
by: Matthew3360 | last post by:
Hi there. I have been struggling to find out how to use a variable as my location in my header redirect function. Here is my code. ...
2
by: Matthew3360 | last post by:
Hi, I have a python app that i want to be able to get variables from a php page on my webserver. My python app is on my computer. How would I make it...
0
hi
by: WisdomUfot | last post by:
It's an interesting question you've got about how Gmail hides the HTTP referrer when a link in an email is clicked. While I don't have the specific...

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.