473,597 Members | 2,375 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

How 2 get a single JDOM from an XML schema that imports other schemas?

Hello All.

We have several XML schemas to describe common component document
parts. We then create new XML schemas as necessary that use "xsd:import
schemaLocation= whateverLocatio n.." to include the common type
definitions from 1 or more of the component XML schemas rather than
just explicitly adding the common definitions in every XML schema we
create.

This works great from a definition and validation point of view, but I
was a little surprised to find that when I generated a JDOM
representation of one of these schemas (that are importing other
schemas) that the resulting JDOM document only has the elements from
the top level schema and does not contain the elements from the
imported component schemas.

I realize that JDOM just considers this XML schema to be just another
XML document, so its not hard to imagine that the using the import from
the XML schema specific namespace would have no affect on the resulting
document, but I thought it might produce a combined XML document with
all the elements. Even playing with JDOM options for validation and
namespace awareness my resulting document was the same.

I am currently trying this with JAXP using Xerces, and I am hoping
there is a way for this to work without relying on any parser specific
property or method.

Any suggestions are very much appreciated. thx in advance.

K.E.Y.

Jul 20 '05 #1
0 1410

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

Similar topics

2
3558
by: Mike:o | last post by:
I need to validate XML documents (orders) against their schema before processing. The PurchaseOrder schema that we use references 3 other schemas using the <imports ...> element. Here is the relationship: - PurchaseOrder.xsd - Base.xsd - Item.xsd - Party.xsd These schemas are all located at a public Internet location. The imports elements within the PurchaseOrder schema look like this:
8
2800
by: Poonam | last post by:
Hi, Can some one please help me with (or point me to) a very simple but working code sample that shows how to import XML Schema. I have tried many samples out there on internet but nothing seems to be working. I am trying to import a complex type/simple type element type from an external xml schema. I am using xs:import tag with namespace and schemalocation attributes defined and have also declared xmlns relative to this xml schema. I...
4
2494
by: Iain A. Mcleod | last post by:
Hi I'm stuck with the following schema validation problem in VS.NET 2003: I have two types of xml document and related schema: project and projectCollection. A projectcollection is just a set of projects. Therefore, I wish to include the project customType in the projectCollection namespace. I therefore have declared two xsd documents: project.xsd and projectcollection.xsd
3
5256
by: rehveli | last post by:
Isn't it possible to generate .cs files from schemas, where one schema imports another, and both have the same namespace? If a.xsd and b.xsd have namespace "MyNameSpace", and in b.xsd I do <xsd:import namespace="MyNameSpace" schemaLocation="a.xsd"/> and run "xsd.exe /c a.xsd b.xsd", xsd.exe errors out with "Error: A schema with the namespace 'MyNameSpace' has already been added."
3
1859
by: farseer | last post by:
Hello, i have a schema which also imports the XHTML schema: <xsd:import namespace="http://www.w3.org/1999/xhtml" schemaLocation="http://www.w3.org/2002/08/xhtml/xhtml1-strict.xsd"/> This schema validates fine in XMLSpy and in VS2005. However, in Visual Studio 2005 beta2, when i attempt to reference this schema from "Templates and Add-ins" it complains that "One or more of
2
3706
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...
5
1761
by: Norsoft | last post by:
How can I convert an existing schema to an xml document. I have a series of schema documents that validate xml documents that describe metadata. Normally the metadata is first defined in a database, then schemas generated from the database. In this case I was given the schemas and I am writing an application to create the database entries. I can't use a dataset as we have a very specific database structure. I started to load them into an...
2
1255
by: Jiho Han | last post by:
I am trying to validate a document against a set of schema and in order to do that, I am using XmlValidatingReader.Schemas.Add to add the schemas. However, since there are dependencies, the framework is crapping out (technical term) saying that the referenced type is not available. Well, the type is defined in the other schema which it imports. How do I get these schemas in there first and then have it validate so the reference is not...
0
1053
by: nmaddock | last post by:
Hi Guys, seen this example on msdn, how can i remove the invalide nodes and elements when they fail against the schema and then save to a new xml document. any help would be great my code is below thanks nathan
0
7959
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
7883
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,...
1
8021
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
8254
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...
1
5842
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
3876
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...
1
2393
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
1
1492
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
1226
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.