Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » XML Schema Definition (XSD) » Format of hrefs in serialised resource
Format of hrefs in serialised resource [message #64337] Thu, 06 October 2005 09:13 Go to next message
Eclipse User
Originally posted by: alan.byrne.adaptive.com

I am attempting to use the XSDResourceImpl class to read an XSD and then
use an XMIResource to write it back out in XMI format.

This on the whole works, but in the XMI output, where there are references
to remote objects (e.g. a simpleType declaration that is imported from
another file), the output contains an href with an unknown format.

An example is

<facets xmi:type="xsd:XSDPatternFacet"
href=" jar:file:/C:/views/byrne_EAM_3.1.x/Solutions/Adaptive%20Arch itectures/webApplication/WEB-INF/lib/xsd.resources.jar!/org/ eclipse/xsd/cache/www.w3.org/2001/XMLSchema.xsd#//integer;XS DSimpleTypeDefinition=38/XSDPatternFacet=1 "/>

Now I am guessing that this means we are looking for a XSDPatternFacet
defined in the XSDSimpleTypeDefinition named 'integer', which can be
located in the XMLSchema.xsd file at the path
/org/eclipse/xsd/cache/www.w3.org/2001 inside the jar located at
/C:/views/byrne_EAM_3.1.x/Solutions/Adaptive%20Architectures /webApplication/WEB-INF/lib/xsd.resources.jar

This is okay, but what do the equals (=) mean towards the end. I thought
it meant the 38th SimpleType and the 1st PatternFacet. Althtough I guess
it is probably the 39th and 2nd as its zero indexed.

Is there any documentation that anyone can point me to which describes
this format and how to interpret it. I believe my interpretation is
probably correct (ish), but I have found an example which does not seem to
comply with these rules.

Any help would be greatfully received.
Re: Format of hrefs in serialised resource [message #64360 is a reply to message #64337] Thu, 06 October 2005 11:43 Go to previous message
Eclipse User
Originally posted by: merks.ca.ibm.com

Alan,

You'll find from previous note threads in the newsgroup that serializing
XSD as XMI won't work properly. You can serialize references to XSD
instances in other model instances, but the XSD implementation is only
capable of serializing XSD as standard .xsd syntax.

Have a look at XSDConcreteComponentImpl's eURIFragmentSegment and
eObjectForURIFragmentSegment. The syntax contains redundant information
so that you can find things either by name or by position (as you
deduced) so that you can either rename things or move things without
breaking the links.


Alan byrne wrote:

> I am attempting to use the XSDResourceImpl class to read an XSD and
> then use an XMIResource to write it back out in XMI format.
>
> This on the whole works, but in the XMI output, where there are
> references to remote objects (e.g. a simpleType declaration that is
> imported from another file), the output contains an href with an
> unknown format.
>
> An example is
>
> <facets xmi:type="xsd:XSDPatternFacet"
> href=" jar:file:/C:/views/byrne_EAM_3.1.x/Solutions/Adaptive%20Arch itectures/webApplication/WEB-INF/lib/xsd.resources.jar!/org/ eclipse/xsd/cache/www.w3.org/2001/XMLSchema.xsd#//integer;XS DSimpleTypeDefinition=38/XSDPatternFacet=1 "/>
>
>
> Now I am guessing that this means we are looking for a XSDPatternFacet
> defined in the XSDSimpleTypeDefinition named 'integer', which can be
> located in the XMLSchema.xsd file at the path
> /org/eclipse/xsd/cache/www.w3.org/2001 inside the jar located at
> /C:/views/byrne_EAM_3.1.x/Solutions/Adaptive%20Architectures /webApplication/WEB-INF/lib/xsd.resources.jar
>
>
> This is okay, but what do the equals (=) mean towards the end. I
> thought it meant the 38th SimpleType and the 1st PatternFacet.
> Althtough I guess it is probably the 39th and 2nd as its zero indexed.
>
> Is there any documentation that anyone can point me to which describes
> this format and how to interpret it. I believe my interpretation is
> probably correct (ish), but I have found an example which does not
> seem to comply with these rules.
>
> Any help would be greatfully received.
>
Re: Format of hrefs in serialised resource [message #596831 is a reply to message #64337] Thu, 06 October 2005 11:43 Go to previous message
Ed Merks is currently offline Ed Merks
Messages: 26014
Registered: July 2009
Senior Member
Alan,

You'll find from previous note threads in the newsgroup that serializing
XSD as XMI won't work properly. You can serialize references to XSD
instances in other model instances, but the XSD implementation is only
capable of serializing XSD as standard .xsd syntax.

Have a look at XSDConcreteComponentImpl's eURIFragmentSegment and
eObjectForURIFragmentSegment. The syntax contains redundant information
so that you can find things either by name or by position (as you
deduced) so that you can either rename things or move things without
breaking the links.


Alan byrne wrote:

> I am attempting to use the XSDResourceImpl class to read an XSD and
> then use an XMIResource to write it back out in XMI format.
>
> This on the whole works, but in the XMI output, where there are
> references to remote objects (e.g. a simpleType declaration that is
> imported from another file), the output contains an href with an
> unknown format.
>
> An example is
>
> <facets xmi:type="xsd:XSDPatternFacet"
> href=" jar:file:/C:/views/byrne_EAM_3.1.x/Solutions/Adaptive%20Arch itectures/webApplication/WEB-INF/lib/xsd.resources.jar!/org/ eclipse/xsd/cache/www.w3.org/2001/XMLSchema.xsd#//integer;XS DSimpleTypeDefinition=38/XSDPatternFacet=1 "/>
>
>
> Now I am guessing that this means we are looking for a XSDPatternFacet
> defined in the XSDSimpleTypeDefinition named 'integer', which can be
> located in the XMLSchema.xsd file at the path
> /org/eclipse/xsd/cache/www.w3.org/2001 inside the jar located at
> /C:/views/byrne_EAM_3.1.x/Solutions/Adaptive%20Architectures /webApplication/WEB-INF/lib/xsd.resources.jar
>
>
> This is okay, but what do the equals (=) mean towards the end. I
> thought it meant the 38th SimpleType and the 1st PatternFacet.
> Althtough I guess it is probably the 39th and 2nd as its zero indexed.
>
> Is there any documentation that anyone can point me to which describes
> this format and how to interpret it. I believe my interpretation is
> probably correct (ish), but I have found an example which does not
> seem to comply with these rules.
>
> Any help would be greatfully received.
>
Previous Topic:Format of hrefs in serialised resource
Next Topic:resolve XSDSimpleTypeDefinition
Goto Forum:
  


Current Time: Sat Aug 30 02:26:19 EDT 2014

Powered by FUDForum. Page generated in 0.01647 seconds