Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » XML Schema Definition (XSD) » Adding XSD to Catalog which includes and imports XSD
Adding XSD to Catalog which includes and imports XSD [message #901837] Tue, 14 August 2012 18:00 Go to next message
Chris Joelly is currently offline Chris JoellyFriend
Messages: 6
Registered: September 2011
Junior Member
Hello,

i want to add an XSD which imports and includes other XSD files to the XSD Catalog with Juno.

The XSD looks like:

<?xml version="1.0" encoding="UTF-8"?>
<xsd:schema elementFormDefault="qualified" attributeFormDefault="unqualified"	
	xmlns="http://www.eclipse.org/spec/BPMN/20100524/MODEL"
	xmlns:xsd="http://www.eclipse.org/2001/XMLSchema"
	xmlns:bpmndi="http://www.eclipse.org/spec/BPMN/20100524/DI"
	targetNamespace="http://www.eclipse.org/spec/BPMN/20100524/MODEL">

	<xsd:import namespace="http://www.eclipse.org/spec/BPMN/20100524/DI" schemaLocation="BPMNDI.xsd"/>
	<xsd:include schemaLocation="Semantic.xsd"/>

        ....


these files are located in the same directory than the XSD referencing them.

Is this possible with Eclipse?

The issue is that validation of XML files fails...

I added the "root" XSD with key type "Schema location" and key "http://www.eclipse.org/spec/BPMN/20100524/MODEL"

--
sh**, i can not post links apart from links to eclipse.org... Sad
Re: Adding XSD to Catalog which includes and imports XSD [message #901865 is a reply to message #901837] Tue, 14 August 2012 19:37 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33140
Registered: July 2009
Senior Member
Chris,

Comments below.

On 14/08/2012 8:00 PM, Chris Joelly wrote:
> Hello,
>
> i want to add an XSD which imports and includes other XSD files to the
> XSD Catalog with Juno.
The catalog is something supported by WTP, so I can't really answer
questions about that...
>
> The XSD looks like:
>
>
> <?xml version="1.0" encoding="UTF-8"?>
> <xsd:schema elementFormDefault="qualified"
> attributeFormDefault="unqualified"
> xmlns="http://www.eclipse.org/spec/BPMN/20100524/MODEL"
> xmlns:xsd="http://www.eclipse.org/2001/XMLSchema"
> xmlns:bpmndi="http://www.eclipse.org/spec/BPMN/20100524/DI"
> targetNamespace="http://www.eclipse.org/spec/BPMN/20100524/MODEL">
>
> <xsd:import
> namespace="http://www.eclipse.org/spec/BPMN/20100524/DI"
> schemaLocation="BPMNDI.xsd"/>
> <xsd:include schemaLocation="Semantic.xsd"/>
>
> ....
>
>
> these files are located in the same directory than the XSD referencing
> them.
That should just work without a catalog. Any relative URIs should be
resolved against the absolute URI of the document containing it, so it
should expect to find these in the same folder.
> Is this possible with Eclipse?
>
> The issue is that validation of XML files fails...
Does the schema itself validate?
>
> I added the "root" XSD with key type "Schema location" and key
> "http://www.eclipse.org/spec/BPMN/20100524/MODEL"
Sounds like a WTP question.


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: Adding XSD to Catalog which includes and imports XSD [message #901975 is a reply to message #901865] Wed, 15 August 2012 11:38 Go to previous message
Chris Joelly is currently offline Chris JoellyFriend
Messages: 6
Registered: September 2011
Junior Member
Hello Ed,

thanks for your reply.

Ed Merks wrote on Tue, 14 August 2012 15:37

> The XSD looks like:
>
> <?xml version="1.0" encoding="UTF-8"?>
> <xsd:schema elementFormDefault="qualified"
> attributeFormDefault="unqualified"
> xmlns="http://www.eclipse.org/spec/BPMN/20100524/MODEL"
> xmlns:xsd="http://www.eclipse.org/2001/XMLSchema"
> xmlns:bpmndi="http://www.eclipse.org/spec/BPMN/20100524/DI"
> targetNamespace="http://www.eclipse.org/spec/BPMN/20100524/MODEL">
>
> <xsd:import
> namespace="http://www.eclipse.org/spec/BPMN/20100524/DI"
> schemaLocation="BPMNDI.xsd"/>
> <xsd:include schemaLocation="Semantic.xsd"/>
> ....
>
> these files are located in the same directory than the XSD referencing
> them.
That should just work without a catalog. Any relative URIs should be
resolved against the absolute URI of the document containing it, so it
should expect to find these in the same folder.

the thing not clear to me yet is:

on the web these files are at http://www.eclipse.org/spec/BPMN/20100501/, but the URL in the files prefixes with http://www.eclipse.org/spec/BPMN/20100524/MODEL. So i dont know if Eclipse can find and validate XML files build against these schema files will work. Thats why i thought adding them to the catalog. But i dont know the difference between the key types "Schema location" and "Namespace name" when adding a schema file to the catalog. but as u mentioned already, i will ask on WTP forum.

Ed Merks wrote on Tue, 14 August 2012 15:37

> The issue is that validation of XML files fails...
Does the schema itself validate?

if i open the BPMN20.xsd from a local folder which contains all other referenced XSD files and Validate it, then Eclipse does not complain about it...

Ed Merks wrote on Tue, 14 August 2012 15:37

> I added the "root" XSD with key type "Schema location" and key
> "http://www.eclipse.org/spec/BPMN/20100524/MODEL"
Sounds like a WTP question.

ok. thanks for the hint. unfortunately most of the time i dont know what forum is best to ask questions about Eclipse, therefore long time i avoided asking. But as it is simply not possible to solve everything by myself... i just posted here Smile

Chris

--
this link posting rule is soo annoying... Sad replace www.eclipse.org with the OMGs .org url if there is a need to use them...
Previous Topic:org.eclipse.xsd.XSDSchema
Next Topic:Maven properties and XML in Eclipse
Goto Forum:
  


Current Time: Thu Apr 25 12:06:39 GMT 2024

Powered by FUDForum. Page generated in 0.03573 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top