  | |  | extensible metadata schema | extensible metadata schema 2003-02-24 - By Christopher Ebert
Hi, It sounds like you might be looking for http://www.eclipse.org/xsd/. No, I haven't used it (wish I had time :). Chris -----Original Message----- From: Praveen Peddi [mailto:ppeddi@(protected)] Sent: Monday, February 24, 2003 1:33 PM To: xerces-j-user@(protected) Subject: Re: extensible metadata schema
Hi Bishal, I like your suggestion, but I think I forgot to mention that my application is implemented in Java and I am not sure how do I automatically generate XML from schema using java. Do you know of any tool that does that? Praveen ----- Original Message ----- From: Bhasin, Vishal <mailto:Vishal.Bhasin@(protected)> To: xerces-j-user@(protected) Sent: Monday, February 24, 2003 4:23 PM Subject: RE: extensible metadata schema
Praveen, You can use XML-SPY to create a sample xml from a schema. You can use the following to validate an XML against a schema - xerces validation programmatically - XML-SPY Cheers, Vishal -----Original Message----- From: Praveen Peddi [mailto:ppeddi@(protected)] Sent: Monday, February 24, 2003 11:13 AM To: xerces-j-user@(protected) Subject: extensible metadata schema Hi all, I work for a company that does an asset metadata integration from different content management systems. We currently have an extensible schema where one can add/remove metadata fields in the schema on the fly. Now my problem is to take the input (mostly name value pairs) from any client and build the xml document which should be valid against the schema. Since the schema is fully extensible, the system doesn't know about it in advance. Now, my question is whats the best way to build the xml document from the input , that should be valid against the schema. Is there a better way where I can parse the schema and build the xml document based on that. Is there any API available to parse the schema and understand the schema attributes etc... Praveen
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <HTML xmlns="http://www.w3.org/TR/REC-html40" xmlns:v = "urn:schemas-microsoft-com:vml" xmlns:o = "urn:schemas-microsoft-com:office:office" xmlns:w = "urn:schemas-microsoft-com:office:word"><HEAD> <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
<META content=Word.Document name=ProgId> <META content="MSHTML 6.00.2800.1141" name=GENERATOR> <META content="Microsoft Word 9" name=Originator><LINK href="cid:filelist.xml@(protected)" rel=File-List><!--[if gte mso 9]><xml> <o:OfficeDocumentSettings> <o:DoNotRelyOnCSS/> </o:OfficeDocumentSettings> </xml><![endif]--><!--[if gte mso 9]><xml> <w:WordDocument> <w:Zoom>0</w:Zoom> <w:DocumentKind>DocumentEmail</w:DocumentKind> <w:EnvelopeVis/> </w:WordDocument> </xml><![endif]--> <STYLE>@(protected) { font-family: Wingdings; } @(protected) { font-family: Tahoma; } @(protected) Section1 {size: 8.5in 11.0in; margin: 1.0in 1.25in 1.0in 1.25in; mso -header-margin: .5in; mso-footer-margin: .5in; mso-paper-source: 0; } P.MsoNormal { FONT-SIZE: 12pt; MARGIN: 0in 0in 0pt; FONT-FAMILY: "Times New Roman"; mso -style-parent: ""; mso-pagination: widow-orphan; mso-fareast-font-family: "Times New Roman" } LI.MsoNormal { FONT-SIZE: 12pt; MARGIN: 0in 0in 0pt; FONT-FAMILY: "Times New Roman"; mso -style-parent: ""; mso-pagination: widow-orphan; mso-fareast-font-family: "Times New Roman" } DIV.MsoNormal { FONT-SIZE: 12pt; MARGIN: 0in 0in 0pt; FONT-FAMILY: "Times New Roman"; mso -style-parent: ""; mso-pagination: widow-orphan; mso-fareast-font-family: "Times New Roman" } P.MsoAutoSig { FONT-SIZE: 12pt; MARGIN: 0in 0in 0pt; FONT-FAMILY: "Times New Roman"; mso -pagination: widow-orphan; mso-fareast-font-family: "Times New Roman" } LI.MsoAutoSig { FONT-SIZE: 12pt; MARGIN: 0in 0in 0pt; FONT-FAMILY: "Times New Roman"; mso -pagination: widow-orphan; mso-fareast-font-family: "Times New Roman" } DIV.MsoAutoSig { FONT-SIZE: 12pt; MARGIN: 0in 0in 0pt; FONT-FAMILY: "Times New Roman"; mso -pagination: widow-orphan; mso-fareast-font-family: "Times New Roman" } SPAN.EmailStyle15 { COLOR: navy; mso-style-type: personal-reply; mso-ansi-font-size: 10.0pt; mso -ascii-font-family: Arial; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial } DIV.Section1 { page: Section1 } OL { MARGIN-BOTTOM: 0in } UL { MARGIN-BOTTOM: 0in } </STYLE> <!--[if gte mso 9]><xml> <o:shapedefaults v:ext="edit" spidmax="1027"/> </xml><![endif]--><!--[if gte mso 9]><xml> <o:shapelayout v:ext="edit"> <o:idmap v:ext="edit" data="1"/> </o:shapelayout></xml><![endif]--></HEAD> <BODY lang=EN-US style="tab-interval: .5in" bgColor=white> <DIV><SPAN class=197213800-25022003><FONT face=Arial color=#0000ff size=2>Hi,</FONT></SPAN></DIV> <DIV><SPAN class=197213800-25022003><FONT face=Arial color=#0000ff size=2></FONT></SPAN> </DIV> <DIV><SPAN class=197213800-25022003><FONT face=Arial color=#0000ff size=2>It sounds like you might be looking for <A href="http://www.eclipse.org/xsd/">http://www.eclipse.org/xsd/</A>. No, I haven't used it (wish I had time :).</FONT></SPAN></DIV> <DIV><SPAN class=197213800-25022003><FONT face=Arial color=#0000ff size=2></FONT></SPAN> </DIV> <DIV><SPAN class=197213800-25022003><FONT face=Arial color=#0000ff size=2></FONT></SPAN> </DIV> <DIV><SPAN class=197213800-25022003><FONT face=Arial color=#0000ff size=2>Chris</FONT></SPAN></DIV> <DIV><SPAN class=197213800-25022003><FONT face=Arial color=#0000ff size=2></FONT></SPAN> </DIV> <BLOCKQUOTE dir=ltr style="MARGIN-RIGHT: 0px"> <DIV class=OutlookMessageHeader dir=ltr align=left><FONT face=Tahoma size=2>-----Original Message-----<BR><B>From:</B> Praveen Peddi [mailto:ppeddi@(protected)]<BR><B>Sent:</B> Monday, February 24, 2003 1:33 PM<BR><B>To:</B> xerces-j-user@(protected)<BR><B>Subject:</B> Re: extensible metadata schema<BR><BR></FONT></DIV> <DIV><FONT face=Arial size=2>Hi Bishal,</FONT></DIV> <DIV><FONT face=Arial size=2>I like your suggestion, but I think I forgot to mention that my application is implemented in Java and I am not sure how do I automatically generate XML from schema using java. Do you know of any tool that does that?</FONT></DIV> <DIV><FONT face=Arial size=2></FONT> </DIV> <DIV><FONT face=Arial size=2>Praveen</FONT></DIV> <BLOCKQUOTE dir=ltr style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px"> <DIV style="FONT: 10pt arial">----- Original Message ----- </DIV> <DIV style="BACKGROUND: #e4e4e4; FONT: 10pt arial; font-color: black"><B>From:< /B> <A title=Vishal.Bhasin@(protected) href="mailto:Vishal.Bhasin@(protected)">Bhasin, Vishal</A> </DIV> <DIV style="FONT: 10pt arial"><B>To:</B> <A title=xerces-j-user@(protected) href="mailto:xerces-j-user@(protected)">xerces-j-user@(protected)</A> </DIV> <DIV style="FONT: 10pt arial"><B>Sent:</B> Monday, February 24, 2003 4:23 PM</DIV> <DIV style="FONT: 10pt arial"><B>Subject:</B> RE: extensible metadata schema</DIV> <DIV><BR></DIV> <DIV class=Section1> <P class=MsoNormal><SPAN class=EmailStyle15><FONT face=Arial color=navy size=2><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial; mso-bidi-font-size: 12.0pt" >Praveen,<o:p></o:p></SPAN></FONT></SPAN></P> <P class=MsoNormal><SPAN class=EmailStyle15><FONT face=Arial color=navy size=2><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial; mso-bidi-font-size: 12.0pt"><! [if !supportEmptyParas]><![endif]> <o:p></o:p></SPAN></FONT></SPAN></P> <P class=MsoNormal style="MARGIN-LEFT: 0.25in"><SPAN class=EmailStyle15><FONT face=Arial color=navy size=2><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial; mso-bidi-font-size: 12.0pt">You can use XML-SPY to create a sample xml from a schema. You can use the following to validate an XML against a schema<o:p></o:p></SPAN></FONT></SPAN></P> <P class=MsoNormal><SPAN class=EmailStyle15><FONT face=Arial color=navy size=2><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial; mso-bidi-font-size: 12.0pt"><! [if !supportEmptyParas]><![endif]> <o:p></o:p></SPAN></FONT></SPAN></P> <P class=MsoNormal style="MARGIN-LEFT: 0.5in; TEXT-INDENT: -0.25in; mso-list: l0 level1 lfo1; tab-stops: list .5in"><![if !supportLists]><SPAN class=EmailStyle15><FONT face="Times New Roman" color=navy size=2><SPAN style="FONT-SIZE: 10pt; mso-bidi-font-size: 12.0pt; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-bidi-font -family: 'Times New Roman'">-<FONT face="Times New Roman" size=1><SPAN style="FONT: 7pt 'Times New Roman'"> </SPAN></FONT></SPAN></FONT></SPAN><![endif]><SPAN class=EmailStyle15><FONT face=Arial color=navy size=2><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial; mso-bidi-font-size: 12.0pt" >xerces validation programmatically <o:p></o:p></SPAN></FONT></SPAN></P> <P class=MsoNormal style="MARGIN-LEFT: 0.5in; TEXT-INDENT: -0.25in; mso-list: l0 level1 lfo1; tab-stops: list .5in"><![if !supportLists]><SPAN class=EmailStyle15><FONT face="Times New Roman" color=navy size=2><SPAN style="FONT-SIZE: 10pt; mso-bidi-font-size: 12.0pt; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-bidi-font -family: 'Times New Roman'">-<FONT face="Times New Roman" size=1><SPAN style="FONT: 7pt 'Times New Roman'"> </SPAN></FONT></SPAN></FONT></SPAN><![endif]><SPAN class=EmailStyle15><FONT face=Arial color=navy size=2><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial; mso-bidi-font-size: 12.0pt">XML -SPY <o:p></o:p></SPAN></FONT></SPAN></P> <P class=MsoNormal><SPAN class=EmailStyle15><FONT face=Arial color=navy size=2><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial; mso-bidi-font-size: 12.0pt"><! [if !supportEmptyParas]><![endif]> <o:p></o:p></SPAN></FONT></SPAN></P> <P class=MsoNormal><SPAN class=EmailStyle15><FONT face=Arial color=navy size=2><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial; mso-bidi-font-size: 12.0pt" >Cheers,<o:p></o:p></SPAN></FONT></SPAN></P> <P class=MsoNormal><SPAN class=EmailStyle15><FONT face=Arial color=navy size=2><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial; mso-bidi-font-size: 12.0pt"><! [if !supportEmptyParas]><![endif]> <o:p></o:p></SPAN></FONT></SPAN></P> <P class=MsoNormal><SPAN class=EmailStyle15><FONT face=Arial color=navy size=2><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial; mso-bidi-font-size: 12.0pt" >Vishal<o:p></o:p></SPAN></FONT></SPAN></P> <P class=MsoNormal><SPAN class=EmailStyle15><FONT face=Arial color=navy size=2><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial; mso-bidi-font-size: 12.0pt"><! [if !supportEmptyParas]><![endif]> <o:p></o:p></SPAN></FONT></SPAN></P> <P class=MsoNormal style="MARGIN-LEFT: 0.5in"><FONT face=Tahoma color=black size=2><SPAN style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: Tahoma">-----Original Message-----<BR><B><SPAN style="FONT-WEIGHT: bold">From:</SPAN></B> Praveen Peddi [mailto:ppeddi@(protected)]<BR><B><SPAN style="FONT-WEIGHT: bold">Sent:</SPAN></B> Monday, February 24, 2003 11:13 AM<BR><B><SPAN style="FONT-WEIGHT: bold">To:</SPAN></B> <A href="mailto:xerces-j-user@(protected)">xerces-j-user@(protected)</A> <BR><B><SPAN style="FONT-WEIGHT: bold">Subject:</SPAN></B> extensible metadata schema</SPAN></FONT></P> <P class=MsoNormal style="MARGIN-LEFT: 0.5in"><FONT face="Times New Roman" size=3><SPAN style="FONT-SIZE: 12pt"><![if !supportEmptyParas]><![endif]> <o:p></o :p></SPAN></FONT></P> <P class=MsoNormal style="MARGIN-LEFT: 0.5in"><FONT face=Arial color=black size=2><SPAN style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: Arial">Hi all,</SPAN></FONT><FONT color=black><SPAN style="COLOR: black; mso-color-alt: windowtext"><o:p></o:p></SPAN></FONT>< /P> <P class=MsoNormal style="MARGIN-LEFT: 0.5in"><FONT face=Arial color=black size=2><SPAN style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: Arial">I work for a company that does an asset metadata integration from different content management systems. We currently have an extensible schema where one can add/remove metadata fields in the schema on the fly. Now my problem is to take the input (mostly name value pairs) from any client and build the xml document which should be valid against the schema. Since the schema is fully extensible, the system doesn't know about it in advance. </SPAN></FONT><FONT color=black><SPAN style="COLOR: black; mso-color-alt: windowtext"><o:p></o:p></SPAN></FONT>< /P> <P class=MsoNormal style="MARGIN-LEFT: 0.5in"><FONT face="Times New Roman" color=black size=3><SPAN style="FONT-SIZE: 12pt; COLOR: black"> </SPAN></FONT><FONT color=black><SPAN style="COLOR: black; mso-color-alt: windowtext"><o:p></o:p></SPAN></FONT>< /P> <P class=MsoNormal style="MARGIN-LEFT: 0.5in"><FONT face=Arial color=black size=2><SPAN style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: Arial">Now, my question is whats the best way to build the xml document from the input, that should be valid against the schema. Is there a better way where I can parse the schema and build the xml document based on that.</SPAN></FONT><FONT color=black><SPAN style="COLOR: black; mso-color-alt: windowtext"><o:p></o:p></SPAN></FONT>< /P> <P class=MsoNormal style="MARGIN-LEFT: 0.5in"><FONT face="Times New Roman" color=black size=3><SPAN style="FONT-SIZE: 12pt; COLOR: black"> </SPAN></FONT><FONT color=black><SPAN style="COLOR: black; mso-color-alt: windowtext"><o:p></o:p></SPAN></FONT>< /P> <P class=MsoNormal style="MARGIN-LEFT: 0.5in"><FONT face=Arial color=black size=2><SPAN style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: Arial">Is there any API available to parse the schema and understand the schema attributes etc...</SPAN></FONT><FONT color=black><SPAN style="COLOR: black; mso-color-alt: windowtext"><o:p></o:p></SPAN></FONT>< /P> <P class=MsoNormal style="MARGIN-LEFT: 0.5in"><FONT face="Times New Roman" color=black size=3><SPAN style="FONT-SIZE: 12pt; COLOR: black"> </SPAN></FONT><FONT color=black><SPAN style="COLOR: black; mso-color-alt: windowtext"><o:p></o:p></SPAN></FONT>< /P> <P class=MsoNormal style="MARGIN-LEFT: 0.5in"><FONT face="Times New Roman" color=black size=3><SPAN style="FONT-SIZE: 12pt; COLOR: black"> </SPAN></FONT><FONT color=black><SPAN style="COLOR: black; mso-color-alt: windowtext"><o:p></o:p></SPAN></FONT>< /P> <P class=MsoNormal style="MARGIN-LEFT: 0.5in"><FONT face=Arial color=black size=2><SPAN style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: Arial">Praveen</SPAN>< /FONT><FONT color=black><SPAN style="COLOR: black; mso-color-alt: windowtext"><o:p></o:p></SPAN></FONT>< /P></DIV></BLOCKQUOTE></BLOCKQUOTE></BODY></HTML>
|
|
 |