Schema Metadata not a Metadata Schema

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Brett Selleck

    Schema Metadata not a Metadata Schema

    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"
    elementFormDefa ult="qualified" attributeFormDe fault="unqualif ied">

    <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,
  • Andy Dingley

    #2
    Re: Schema Metadata not a Metadata Schema

    On 4 Sep 2003 07:39:46 -0700, selleckb@hotmai l.com (Brett Selleck)
    wrote:
    [color=blue]
    >I would like to start collecting Metadata on my XML schemas.[/color]

    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:annotatio n> & <xs:documentati on> 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.

    [color=blue]
    > <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[/color]


    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.

    Comment

    Working...