473,854 Members | 1,476 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

namespaces and validating with heirarchical schemas

I'm a newbie to XML and primarily program in SAS, so even though I've
consulted documentation, I can't translate into language I understand.
I hope I can explain the problem clearly.

The project I'm currently on starts with XML files (say, 10 as an
example) that, after validation, are reconfigured via SAS for Teradata
loading. Since we're in development, the location of needed schemas
isn't fixed, often moving as phases are completed or copied to local
directories. Sometimes both the server and subdirectory name changes
and sometimes the subdirectory name changes but the server doesn't.

The 10 input files validate against 4 schemas and I'm looking for a way
to generalize file paths so I only have to edit as few files as
possible--preferably one--instead of multiple files.
=============== =============== ==============
In the following example the schemas are in the same subdirectories.

The File1.xml header looks like this:

<?xml version="1.0" encoding="UTF-8"?>
<Schema_1 xmlns:xsi="http ://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespace SchemaLocation= "\\Fil-1\User1\Schema_ 1.xsd "

The relevant lines in Schemas _1 to _3:

<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" version="2.00"
<xs:include schemaLocation= "\\Fil-1\User1\Schema_ 2.xsd"/>

<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" version="2.00"
<xs:include schemaLocation= "\\Fil-1\User1\Schema_ 3.xsd"/>

<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" version="2.00"
<xs:include schemaLocation= "\\Fil-1\User1\Schema_ 4.xsd"/>

Schema_4 terminates the process.
=============== =============== ===========

Now, suppose Schema_4 is moved to the Development subdirectory on the
same server,

"\\Fil-1\Development\S chema_4.xsd"/

and since it's used by all input files I have a bunch of files (at
level _3) to modify. If all the Schema_3's move, I have a bunch of
level _2's to modify. If only some files move, I have different
locations for the same schema level.

In SAS I would create a global variable that resolves to the locations
and they would be passed to subsequent programs. I guess I'm looking
for a way to declare the locations in the input file. Or, is there a
way to involve another schema where I can declare the locations?

Apr 19 '06 #1
0 1447

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

Similar topics

by: tysontate | last post by:
I've been charged with updating old schemas for various files that have never actually been validated against each other. I've got the schema itself in good form at this point - I'm positive that they're pretty clean. My only remaining problem is namespaces. The XML files, which I can't modify, use no namespaces at all. They contain elements from as many as four different files. Example: "CargoList" in CargoList.xsd contains a sequence...
by: inerte | last post by:
Hello all! I need to build an XML file structure so a client can import data to one of our systems. Totally new to XML, I learned about Namespaces and DTD, and built a nice spec using them. Now I am trying to use XML Schemas to tell more about what kind of data are allowed on each element/attribute, but I can't understand how to mix Namespaces and Schemas. Can anyone give me tips, starting points, about how to specify the
by: Iain | last post by:
I've got a system which takes an XML file, translates it into an update gram and then loads it into my database with SQLXML3 (all in dot net). But it's fragile. And the SQLXML 3 error reporting is not absolutely wonderful. So what I want to do is to validate it before I upload it. When I try and do this I get MILLIONS of errors (well lots) complaining about elements like ROOT which are part of the
by: Ryan | last post by:
I have a very complex XDR schema that uses namespaces: xmlns="urn:schemas-microsoft-com:xml-data" xmlns:b="urn:schemas-microsoft-com:BizTalkServer" xmlns:d="urn:schemas-microsoft-com:datatypes" Do I need to build a custom validator in order to validate XML documents against this schema? How does the XML parser know how to validate against the extra namespaces?
by: John Smith | last post by:
Ok, I am not sure if it is possible. But what I'm trying to do is validate an XML file with out having to add namespace in the xml. What I mean is lets say I have 2 XSD they have different namespaces and lvl2 is used in lvl using the import feature lvl1.xsd -> lvl2.xsd
by: Dan Bass | last post by:
There's an XML message I have, that has no namespace information. Then there is a XSD schema that is must validate against, but this has a targetNamespace and xmlns of "http://www.wbf.org/xml/b2mml-v02". How do I get this XML to validate against the Schema in C#? If I use XmlSpy (2005 home edition) to perform the validation, it first inserts namespace and schema information into the XML before validating. Validation then seems to work if...
by: blat001 | last post by:
Hi, Not 100% sure if this is the correct group to post in but. I have a class that I want to serialize/deserialize to match the MM7 specifications, which I have done but now that we are starting to connect to a few different people we have realised that there are multiple versions of the specification and each one has been defined in a different namespace, now the actual xml is the same between the versions
by: Patrick Brunmayr | last post by:
Hello I have a big Problem with validating a Soap Envelope. I have downloaded the xsd for a soap envelope from http://schemas.xmlsoap.org/soap/envelope/ The validation succeeds as lonng as i don't use elements in body with a xsi:type attribute! The Problem is that foo:person is an abstract type and foo:driver is dervived from it. So using a foo:person is not allowed until specifing
by: theonlydavewilliams | last post by:
Hi there I'm hoping there's an easy answer to a (hopefully) not too long-winded issue... I'm building a C# web client using a proxy wsdl.exe'd from a wsdl file and six schemas, each in a different namespace. Some schemas extend complex types in others. When i get a soap:Fault from my test server it could contain a serialized exception object (called fault) from one of two of these schemas (and different namespaces, call them xmlns:b0="ns1" and...
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...
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,...
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
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,...
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...
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...
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
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
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.