473,729 Members | 2,133 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 3546
/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:schemaLocat ion, xsi:noNamespace SchemaLocation"
<http://www.w3.org/TR/xmlschema-1/#xsi_schemaLoca tion>

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 programmaticall y, 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 noNamespaceSche maLocation
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:schemaLocat ion, xsi:noNamespace SchemaLocation"
<http://www.w3.org/TR/xmlschema-1/#xsi_schemaLoca tion>

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 programmaticall y, 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*********@gma il.com/:
A schema is not required to have a namespace (see Undeclared Target
Namespaces (§3.4)) and so there is a noNamespaceSche maLocation
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.xs d"

<?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.xm l"

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

bla-bla

</example>
There:

<http://www.w3.org/TR/xmlschema-0/#UsingSchemaLoc ationInQuarterl y>:
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 'noNamespaceSch emaLocation' 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
2280
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 "midterm exam" in his self-taught "how to program in C++" course, it's seeming to be an insurmountable problem. Can anyone assist? I'm at wit's end here. Everything *LOOKS* (to this rookie, anyway) correct, but the compiler is barfing on it. Here's the class declaration for Bar class Bar {
0
1313
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 = XMLString::transcode(namespaceAndPath); //namespaceAndPath stands for the namespace and schema path containing whitespaces parser->setProperty(XMLUni::fgXercesSchemaExternalSchemaLocation,
7
2673
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 not find '}' at end of input node pg_dump: The command was: select (select usename from pg_user where usesysid = datdba) as dba, pg_encoding_to_char(encoding) as encoding, datpath from pg_database where datname = 'dc' pg_dumpall: pg_dump failed on database "dc", exiting
2
3710
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 the import statement includes schemaLocation="../xlink/xlinks.xsd". I've written a schema that imports the top level one using schemaLocation="http://schemas.opengis.net/gml/3.1.0/base/feature.xsd". I've also tried downloading it and putting it in the schema cache but in both cases the build...
1
3363
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 table/schema name that I specify in my query, I would like the correct library to be 'looked up' with out having to manually code the Library name, LIBRARY.TABLE. ex:(Assume TABLE1 resides in LIB1) strSQL = "SET PATH = LIB, LIB1, LIB2, LIB3..."
1
1110
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
3045
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 document explicitly declares the schema as a default namespace, Validate() just lets it slide through as a success. Is there a way to Validate() either a) mandating against a particular schema, or at the very least b) supplying a default namespace to be used even when not explicitly declared?
4
4208
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 and windows, C# the past 4 years. I've been working on a personal ASP.NET project, basically as a learning tool and I have a major issue which is really really getting on my nerves. I'm creating a web application in ASP.NET 2.0 which dynamically populates a table with text and text boxes....
1
6501
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 /usr/local/php. However, when I set my "error_reporting" setting to be "E_ALL", notices are still not getting reported. The perms on my file are 664, with owner root and group root. The php.ini file is located at /usr/local/lib/php/php.ini. Any ideas why the setting does not seem to be having an effect? ...
0
8923
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8763
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9428
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
9203
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
6025
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
4529
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...
0
4796
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3238
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
2165
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.