By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,062 Members | 1,358 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,062 IT Pros & Developers. It's quick & easy.

Schema Metadata not a Metadata Schema

P: n/a
I would like to start collecting Metadata on my XML schemas. I have
searched the web for a method of automatically extracting Metadata
from an XSD file and have come up empty handed. Basically what I am
looking for is a VB Script or J Script that parses an XSD file and
outputs the metadata in a structured format. For examle: Given this
simple Schema below I would like to see the following.

Schema:
<?xml version="1.0" encoding="UTF-8"?>

<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
elementFormDefault="qualified" attributeFormDefault="unqualified">

<xs:element name="Book">

<xs:complexType>

<xs:all>

<xs:element ref="ISBN"/>

<xs:element ref="Title"/>

<xs:element name="Author" type="xs:string"/>

</xs:all>

</xs:complexType>

</xs:element>

<xs:element name="Title" type="xs:string"/>

<xs:element name="ISBN" type="xs:long"/>

</xs:schema>

I would like to see this:

Element DataType IsGlobal Parent
ISBN long Y Book
Title string Y Book
Author string N Book
Book ComplexType Y Schema

Has anybody seen a tool that will do this? Or have a strategy on how
to extract this information?

Thanks,
Jul 20 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
On 4 Sep 2003 07:39:46 -0700, se******@hotmail.com (Brett Selleck)
wrote:
I would like to start collecting Metadata on my XML schemas.
What is "metadata on a schema" ?

If an author creates a schema and embeds some metadata, then you can
extract it. You might find <xs:annotation> & <xs:documentation> and
use their contents. You could also infer metadata, from the initial
URL of a schema, or from any <xs:include> elements you might
encounter.

Then you can take this set of metadata properties you have, and
publish this application-schema-metadata through a popular
metadata-schema, such as Dublin Core.

You could do this operation though many ways, but XSLT would be an
obvious choice.

<xs:element name="Title" type="xs:string"/>

<xs:element name="ISBN" type="xs:long"/>

</xs:schema>

I would like to see this:

Element DataType IsGlobal Parent
ISBN long Y Book
Title string Y Book

This looks like a different problem. This is scanning a schema to see
if it contains elements that are suggestive of being
"metadata-related" properties, and then extracting them.

Again, you could use XSLT to do much of this.

Jul 20 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.