[prev in list] [next in list] [prev in thread] [next in thread] 

List:       xmlbeans-dev
Subject:    RE: Merging XSDs
From:       "Cezar Andrei" <cezar () bea ! com>
Date:       2008-05-02 21:00:22
Message-ID: BF6B6CA032BA0A429BD924F96765147DBF3392 () repbex02 ! amer ! bea ! com
[Download RAW message or body]

Joe, there isn't a tool or a quick way to do this with XMLBeans. But you
know XMLBeans can compile multiple schema files at once, if this is your
target you shouldn't modify the schema files.

 

A tool to do this shouldn't be very hard to write, per target namespace,
one will need to normalize namespaces (optionally use the same
prefixes), use same values of elementFormDefault and
attributeformDefault, and than combine the contents of schema elements.

 

Cezar

 

________________________________

From: Gresock, Joe [mailto:gresockj@bah-systems.com] 
Sent: Friday, May 02, 2008 9:35 AM
To: dev@xmlbeans.apache.org
Subject: Merging XSDs

 

I have an interesting problem, and I don't know whether XMLBeans is able
to solve it.

 

I have several XSDs that I would like to merge into one.  Since XMLBeans
creates a SchemaTypeSystem when importing multiple XSDs, I thought it
might be possible to somehow write the type system into a new XSD that
incorporates all elements/attributes/types/etc.  Furthermore, ideally
all element/type references would be resolved into their elements/types.


 

I was playing around with the combination of applying xsd2inst on all
the schemas and then running inst2xsd on the resulting instance
documents, but I don't believe this will capture the appinfo, which is
essential.

 

Is there any way to do this using XMLBeans?


Notice:  This email message, together with any attachments, may contain information  \
of  BEA Systems,  Inc.,  its subsidiaries  and  affiliated entities,  that may be \
confidential,  proprietary,  copyrighted  and/or legally privileged, and is intended \
solely for the use of the individual or entity named in this message. If you are not \
the intended recipient, and have received this message in error, please immediately \
return this by email and then delete it.


[Attachment #3 (text/html)]

<html xmlns:v="urn:schemas-microsoft-com:vml" \
xmlns:o="urn:schemas-microsoft-com:office:office" \
xmlns:w="urn:schemas-microsoft-com:office:word" \
xmlns:st1="urn:schemas-microsoft-com:office:smarttags" \
xmlns="http://www.w3.org/TR/REC-html40">

<head>
<meta http-equiv=Content-Type content="text/html; charset=us-ascii">
<meta name=Generator content="Microsoft Word 11 (filtered medium)">
<!--[if !mso]>
<style>
v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
</style>
<![endif]--><o:SmartTagType
 namespaceuri="urn:schemas-microsoft-com:office:smarttags" name="PersonName"/>
<!--[if !mso]>
<style>
st1\:*{behavior:url(#default#ieooui) }
</style>
<![endif]-->
<style>
<!--
 /* Font Definitions */
 @font-face
	{font-family:"Lucida Sans";
	panose-1:2 11 6 2 3 5 4 2 2 4;}
@font-face
	{font-family:Tahoma;
	panose-1:2 11 6 4 3 5 4 4 2 4;}
 /* Style Definitions */
 p.MsoNormal, li.MsoNormal, div.MsoNormal
	{margin:0in;
	margin-bottom:.0001pt;
	font-size:12.0pt;
	font-family:"Times New Roman";}
a:link, span.MsoHyperlink
	{color:blue;
	text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
	{color:purple;
	text-decoration:underline;}
p.Code, li.Code, div.Code
	{margin:0in;
	margin-bottom:.0001pt;
	font-size:10.0pt;
	font-family:"Lucida Sans";
	color:navy;}
span.EmailStyle18
	{mso-style-type:personal;
	font-family:Arial;
	color:windowtext;}
span.EmailStyle19
	{mso-style-type:personal-reply;
	font-family:Arial;
	color:navy;}
@page Section1
	{size:8.5in 11.0in;
	margin:1.0in 1.25in 1.0in 1.25in;}
div.Section1
	{page:Section1;}
-->
</style>

</head>

<body lang=EN-US link=blue vlink=purple>

<div class=Section1>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>Joe, there isn&#8217;t a tool or a quick
way to do this with XMLBeans. But you know XMLBeans can compile multiple schema
files at once, if this is your target you shouldn&#8217;t modify the schema
files.<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>A tool to do this shouldn&#8217;t be very
hard to write, per target namespace, one will need to normalize namespaces \
(optionally use the same prefixes), use same values of elementFormDefault and
attributeformDefault, and than combine the contents of schema \
elements.<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>Cezar<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'><o:p>&nbsp;</o:p></span></font></p>

<div style='border:none;border-left:solid blue 1.5pt;padding:0in 0in 0in 4.0pt'>

<div>

<div class=MsoNormal align=center style='text-align:center'><font size=3
face="Times New Roman"><span style='font-size:12.0pt'>

<hr size=2 width="100%" align=center tabindex=-1>

</span></font></div>

<p class=MsoNormal><b><font size=2 face=Tahoma><span style='font-size:10.0pt;
font-family:Tahoma;font-weight:bold'>From:</span></font></b><font size=2
face=Tahoma><span style='font-size:10.0pt;font-family:Tahoma'> Gresock, Joe
[mailto:gresockj@bah-systems.com] <br>
<b><span style='font-weight:bold'>Sent:</span></b> Friday, May 02, 2008 9:35 AM<br>
<b><span style='font-weight:bold'>To:</span></b> <st1:PersonName \
w:st="on">dev@xmlbeans.apache.org</st1:PersonName><br> <b><span \
style='font-weight:bold'>Subject:</span></b> Merging \
XSDs</span></font><o:p></o:p></p>

</div>

<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'>I have an interesting problem, and I don&#8217;t know
whether XMLBeans is able to solve it.<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'>I have several XSDs that I would like to merge into one.
&nbsp;Since XMLBeans creates a SchemaTypeSystem when importing multiple XSDs, I
thought it might be possible to somehow write the type system into a new XSD
that incorporates all elements/attributes/types/etc. &nbsp;Furthermore, ideally
all element/type references would be resolved into their elements/types.&nbsp; \
<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'>I was playing around with the combination of applying
xsd2inst on all the schemas and then running inst2xsd on the resulting instance
documents, but I don&#8217;t believe this will capture the appinfo, which is
essential.<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'>Is there any way to do this using \
XMLBeans?<o:p></o:p></span></font></p>

</div>

</div>

</body>

</html>
<br>
Notice:  This email message, together with any attachments, may contain information  \
of  BEA Systems,  Inc.,  its subsidiaries  and  affiliated entities,  that may be \
confidential,  proprietary,  copyrighted  and/or legally privileged, and is intended \
solely for the use of the individual or entity named in this message. If you are not \
the intended recipient, and have received this message in error, please immediately \
return this by email and then delete it.



[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic