Subjects
Home
VOTE Move XML Commons to Xerces
Commented: (XERCESJ 589) Bug with pattern restriction on long strings
: Xerces J 2 8 1 Release on Wednesday, September 13th
: Xerces J 2 9 0 Release on Wednesday, November 22nd
Commented: (XERCESJ 1066) Restriction+choice+substitutionGroup error
Commented: (XERCESJ 1178) Error getting prefix for an attribute with no n
Updated: (XERCESJ 1244) XMLSchemaValidator does not contribute element 's
Some consideration about the xerces DOM implementation
Updated: (XERCESJ 1066) Restriction+choice+substitutionGroup error
Commented: (XERCESJ 1227) Poor performance / OutOfMemoryError for sequenc
retain exception stack traces
Updated: (XERCESJ 1193) NPE or hang when parsing using the "continue afte
Future of NekoHTML
Commented: (XERCESJ 1203) NPE in XMLDTDProcessor
DOM Level 3 APIs for Xalan J and a new Xalan release (2 7 1)
: xml commons external 1 3 04 Release on Wednesday, November 22nd
Commented: (XERCESJ 1247) Incorrect location information on SAX when usin
XInclude exceptions how to mirror Xerces J functionality into Xerces C++?
First proposal on SoC project "Add support for the StAX (JSR 173) cursor API
: xml commons resolver 1 2 Release on Wednesday, November 22nd
Typo in RangeToken java Please check
Validator features
java lang ClassCastException when adopting Node
using the org apache xerces impl xs identity package
Updated: (XERCESJ 1257) buffer overflow in UTF8Reader for characters out
Problem with ref attributes and schema validation
Updated: (XERCESJ 122) XMLSchemaValidator does not contribute element 's d
Performance problem under load Xerces with Weblogic 9 x
remove ignored memory allocation
Commented: (XERCESJ 1177) SAXXMLStreamReader doesn 't always report namesp
Commented: (XERCESJ 977) Null pointer exception during DOM parsing
Commented: (XERCESJ 1197) Code cleanup for org apache xml serialize
Commented: (XERCESJ 1201) Initial contribution for StAX Event API
Updated: (XERCESJ 1061) Regex "$ " and "^ " characters treated as special c
Commented: (XERCESJ 1199) SAXXMLStreamReader should attempt to register a
Commented: (XERCESJ 1061) Regex "$ " and "^ " characters treated as special
Updated: (XERCESJ 589) Bug with pattern restriction on long strings
StackOverflow
xerces Range unnecessarily not garbage collectable if not detached
Updated: (XERCESJ 1178) Error getting prefix for an attribute with no nam
Bug in xs:redefine
Commented: (XERCESJ 1204) Can not set XMLEntityResolver for LSParser
Updated: (XERCESJ 1253) Prototype for SoC2007 project "Add support for th
Updated: (XERCESJ 1259) Add SteamFilter Function to SoC2007 project "Add
Assigned: (XERCESJ 444) SAXException thrown by EntityResolver is reported
Google Summer of Code 2007
Xerces J and XInclude relative path issue
Assigned: (XERCESJ 206) Stack overflow when using a schema validation
Commented: (XERCESJ 1215) Restrictions involving two levels of substituti
Closed: (XERCESJ 1203) NPE in XMLDTDProcessor
non overriding equals methoda
Resolved: (XERCESJ 1079) invalid value returned for TOTALDIGITS facet in
Xerces AS3 port
Updated: (XERCESJ 325) Regular Expression; Pattern "| " clause order de
Updated: (XERCESJ 1196) Javadoc generation fails on Java SE 5 0
Closed: (XERCESJ 1202) DTD validation on XIncluded documents when the sch
Created: (XERCESJ 1124) Nonspecific schema error message
a bug in xerces
Updated: (XERCESJ 1201) Initial contribution for StAX Event API
Closed: (XERCESJ 1254) Empty uris in targetNamespace attribute not report
Links
Home
Oracle database error code
 
Search:  
Power your search with and, or, +, -, or "some phrase" operators.
extensible metadata schema

extensible metadata schema

2003-02-24       - By Bhasin, Vishal
Reply:     1     2     3     4     5  

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:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft
-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns="http:
//www.w3.org/TR/REC-html40">

<head>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">


<meta name=ProgId content=Word.Document>
<meta name=Generator content="Microsoft Word 9">
<meta name=Originator content="Microsoft Word 9">
<link rel=File-List href="cid:filelist.xml@(protected)">
<!--[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>
<!--
/* Font Definitions */
@(protected)
  {font-family:Wingdings;
  panose-1:5 0 0 0 0 0 0 0 0 0;
  mso-font-charset:2;
  mso-generic-font-family:auto;
  mso-font-pitch:variable;
  mso-font-signature:0 268435456 0 0 -2147483648 0;}
@(protected)
  {font-family:Tahoma;
  panose-1:2 11 6 4 3 5 4 4 2 4;
  mso-font-charset:0;
  mso-generic-font-family:swiss;
  mso-font-pitch:variable;
  mso-font-signature:553679495 -2147483648 8 0 66047 0;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
  {mso-style-parent:"";
  margin:0in;
  margin-bottom:.0001pt;
  mso-pagination:widow-orphan;
  font-size:12.0pt;
  font-family:"Times New Roman";
  mso-fareast-font-family:"Times New Roman";}
p.MsoAutoSig, li.MsoAutoSig, div.MsoAutoSig
  {margin:0in;
  margin-bottom:.0001pt;
  mso-pagination:widow-orphan;
  font-size:12.0pt;
  font-family:"Times New Roman";
  mso-fareast-font-family:"Times New Roman";}
span.EmailStyle15
  {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;
  color:navy;}
@(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;}
div.Section1
  {page:Section1;}
/* List Definitions */
@(protected) l0
  {mso-list-id:2073191263;
  mso-list-type:hybrid;
  mso-list-template-ids:-915766400 51527032 67698691 67698693 67698689 67698691
67698693 67698689 67698691 67698693;}
@(protected) l0:level1
  {mso-level-start-at:0;
  mso-level-number-format:bullet;
  mso-level-text:-;
  mso-level-tab-stop:.5in;
  mso-level-number-position:left;
  text-indent:-.25in;
  font-family:"Times New Roman";
  mso-fareast-font-family:"Times New Roman";}
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 bgcolor=white lang=EN-US style='tab-interval:.5in'>

<div class=Section1>

<p class=MsoNormal><span class=EmailStyle15><font size=2 color=navy face=Arial>
<span
style='font-size:10.0pt;mso-bidi-font-size:12.0pt;font-family:Arial'>Praveen,<o
:p></o:p></span></font></span></p>

<p class=MsoNormal><span class=EmailStyle15><font size=2 color=navy face=Arial>
<span
style='font-size:10.0pt;mso-bidi-font-size:12.0pt;font-family:Arial'><![if
!supportEmptyParas]>&nbsp;<![endif]><o:p></o:p></span></font></span></p>

<p class=MsoNormal style='margin-left:.25in'><span class=EmailStyle15><font
size=2 color=navy face=Arial><span style='font-size:10.0pt;mso-bidi-font-size:
12.0pt;font-family:Arial'>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 size=2 color=navy face=Arial>
<span
style='font-size:10.0pt;mso-bidi-font-size:12.0pt;font-family:Arial'><![if
!supportEmptyParas]>&nbsp;<![endif]><o:p></o:p></span></font></span></p>

<p class=MsoNormal style='margin-left:.5in;text-indent:-.25in;mso-list:l0
level1 lfo1;
tab-stops:list .5in'><![if !supportLists]><span class=EmailStyle15><font
size=2 color=navy face="Times New Roman"><span style='font-size:10.0pt;
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 size=1
face="Times New Roman"><span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span></font></span></font></span><![endif]><span class=EmailStyle15><font
size=2 color=navy face=Arial><span style='font-size:10.0pt;mso-bidi-font-size:
12.0pt;font-family:Arial'>xerces validation programmatically <o:p></o:p></span>
</font></span></p>

<p class=MsoNormal style='margin-left:.5in;text-indent:-.25in;mso-list:l0
level1 lfo1;
tab-stops:list .5in'><![if !supportLists]><span class=EmailStyle15><font
size=2 color=navy face="Times New Roman"><span style='font-size:10.0pt;
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 size=1
face="Times New Roman"><span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span></font></span></font></span><![endif]><span class=EmailStyle15><font
size=2 color=navy face=Arial><span style='font-size:10.0pt;mso-bidi-font-size:
12.0pt;font-family:Arial'>XML-SPY <o:p></o:p></span></font></span></p>

<p class=MsoNormal><span class=EmailStyle15><font size=2 color=navy face=Arial>
<span
style='font-size:10.0pt;mso-bidi-font-size:12.0pt;font-family:Arial'><![if
!supportEmptyParas]>&nbsp;<![endif]><o:p></o:p></span></font></span></p>

<p class=MsoNormal><span class=EmailStyle15><font size=2 color=navy face=Arial>
<span
style='font-size:10.0pt;mso-bidi-font-size:12.0pt;font-family:Arial'>Cheers,<o
:p></o:p></span></font></span></p>

<p class=MsoNormal><span class=EmailStyle15><font size=2 color=navy face=Arial>
<span
style='font-size:10.0pt;mso-bidi-font-size:12.0pt;font-family:Arial'><![if
!supportEmptyParas]>&nbsp;<![endif]><o:p></o:p></span></font></span></p>

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

<p class=MsoNormal><span class=EmailStyle15><font size=2 color=navy face=Arial>
<span
style='font-size:10.0pt;mso-bidi-font-size:12.0pt;font-family:Arial'><![if
!supportEmptyParas]>&nbsp;<![endif]><o:p></o:p></span></font></span></p>

<p class=MsoNormal style='margin-left:.5in'><font size=2 color=black
face=Tahoma><span style='font-size:10.0pt;font-family:Tahoma;color:black'>----
-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> xerces-j-user@(protected)
<br>
<b><span style='font-weight:bold'>Subject:</span></b> extensible metadata
schema</span></font></p>

<p class=MsoNormal style='margin-left:.5in'><font size=3 face="Times New Roman"
><span
style='font-size:12.0pt'><![if !supportEmptyParas]>&nbsp;<![endif]><o:p></o:p><
/span></font></p>

<p class=MsoNormal style='margin-left:.5in'><font size=2 color=black
face=Arial><span style='font-size:10.0pt;font-family:Arial;color:black'>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:.5in'><font size=2 color=black
face=Arial><span style='font-size:10.0pt;font-family:Arial;color:black'>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:.5in'><font size=3 color=black
face="Times New Roman"><span style='font-size:12.0pt;color:black'>&nbsp;</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:.5in'><font size=2 color=black
face=Arial><span style='font-size:10.0pt;font-family:Arial;color:black'>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:.5in'><font size=3 color=black
face="Times New Roman"><span style='font-size:12.0pt;color:black'>&nbsp;</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:.5in'><font size=2 color=black
face=Arial><span style='font-size:10.0pt;font-family:Arial;color:black'>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:.5in'><font size=3 color=black
face="Times New Roman"><span style='font-size:12.0pt;color:black'>&nbsp;</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:.5in'><font size=3 color=black
face="Times New Roman"><span style='font-size:12.0pt;color:black'>&nbsp;</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:.5in'><font size=2 color=black
face=Arial><span style='font-size:10.0pt;font-family:Arial;color:black'>Praveen
</span></font><font
color=black><span style='color:black;mso-color-alt:windowtext'><o:p></o:p><
/span></font></p>

</div>

</body>

</html>