K2 BLACKPEARL PRODUCT DOCUMENTATION: USER GUIDE
XML Metadata

XML Metadata

The relationship between XML and metadata is an interesting one. As XML incorporates a great deal of the original requirements placed on metadata into the actual definition of a document

XML Metadata plays an even more important role as it initializes the document model and typically takes the form of the XML document that the XML Schema is based on or defined by the XML Schema. This is particularly useful in clarifying the resultant document structures when dealing with nested Schemas. It also set the standard used between different examples for data exchange.

It is critical to define the XML Metadata in K2 blackpearl - so that the defined Schema is initialized correctly

Typically XML Metadata is an empty XML file defined by the Schema.

XML Metadata Example

To understand XML Metadata in context - consider the bibliography example from XML Basics

Example XML File

Copy

<!--XML Definition for a Bibliography-->

<bibliography>

<!--First Book Reference Start-->

  <reference id="1" isbn="1-56414-639-1">

<!--Author Listing Start-->

    <authors>

      <author>

        <last_name>Iacone</last_name>

        <initials>SJ</initials>

      </author>

    </authors>

<!--Author Listing End-->

    <title>Write to the Point</title>

    <publisher>Career Press</publisher>

    <publish_date>2003</publish_date>

  </reference>

<!--First Book End-->

Supporting XML Schema

The data set is supported by the following Schema definition

Copy

<xs:schema id="XMLField" 
                   xmlns:xs=" http://www.w3.org/2001/XMLSchema"
                   xmlns:msdata="urn:schemas-microsoft-com:xml-msdata" 
                   attributeFormDefault="qualified" elementFormDefault="qualified">
<xs:element name="bibliography">
   <xs:complexType>
    <xs:sequence>
     <xs:element name="reference">
       <xs:complexType>
        <xs:sequence>
         <xs:element name="title" type="xs:string" minOccurs="0" maxOccurs="1" />
         <xs:element name="publisher" type="xs:string" minOccurs="0"  maxOccurs="1" />
         <xs:element name="publish_date" type="xs:date" minOccurs="0"  maxOccurs="1" />
         <xs:element name="authors">
           <xs:complexType>
            <xs:sequence>
             <xs:element name="author">
               <xs:complexType>
                <xs:sequence>
                 <xs:element name="last_name" type="xs:string" minOccurs="0"  maxOccurs="1"/>
                 <xs:element name="initials" type="xs:string" minOccurs="0"  maxOccurs="1"/>
                </xs:sequence>
               </xs:complexType>
             </xs:element>
            </xs:sequence>
           </xs:complexType>
         </xs:element>
        </xs:sequence>
       </xs:complexType>
     </xs:element>
    </xs:sequence>
   </xs:complexType>
 </xs:element>
</xs:schema>

XML Metadata

The XML Metadata is defined by the basic document structure and the initialization values - in this case empty strings.

Copy

<bibliography>
  <reference>
    <authors>
       <author>
         <last_name />
         <initials />
       </author>
    </authors>
    <title />
    <publisher />
    <publish_date />
  </reference>
</bibliography>

 

 


K2 blackpearl Help 4.6.11 (4.12060.1731.0)