Difference between revisions of "Meta data"

From Apache OpenOffice Wiki
Jump to: navigation, search
Line 13: Line 13:
 
                 xmlns:text="urn:oasis:names:tc:opendocument:xmlns:text:1.0"
 
                 xmlns:text="urn:oasis:names:tc:opendocument:xmlns:text:1.0"
 
                 xmlns:draw="urn:oasis:names:tc:opendocument:xmlns:drawing:1.0">
 
                 xmlns:draw="urn:oasis:names:tc:opendocument:xmlns:drawing:1.0">
 +
 
  <rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
 
  <rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
 
           xmlns:dc="http://purl.org/dc/elements/1.1/">
 
           xmlns:dc="http://purl.org/dc/elements/1.1/">
   <rdf:Description rdf:about="content.xml#graphics01">  
+
   <rdf:Description rdf:nodeID="graphics01">  
 
   <dc:creator>Mr. X</dc:creator>
 
   <dc:creator>Mr. X</dc:creator>
 
   </rdf:Description>
 
   </rdf:Description>
 +
</rdf:RDF>
 +
 
  <office:body>
 
  <office:body>
 
   <office:text>
 
   <office:text>
 
   <text:p>This
 
   <text:p>This
 
       <draw:frame>
 
       <draw:frame>
         <draw:image>
+
         <draw:image rdf:nodeID="graphics01">
 
         <office:binary-data>...</office:binary-data>
 
         <office:binary-data>...</office:binary-data>
 
         </draw:image>
 
         </draw:image>
Line 29: Line 32:
 
   </office:text>
 
   </office:text>
 
  </office:body>
 
  </office:body>
 +
 
</office:document>
 
</office:document>
 
</pre>
 
</pre>
 
 
  
 
==== Sample (external RDF stream) ====
 
==== Sample (external RDF stream) ====

Revision as of 14:43, 1 March 2007

OpenDocument and Metadata Primer

  • Flat XML?

Sample adding dc:creator metadata to a frame

MetaData DC Creator Mr X.jpg

Sample FlatXML

<office:document xmlns:office="urn:oasis:names:tc:opendocument:xmlns:office:1.0"
                 xmlns:text="urn:oasis:names:tc:opendocument:xmlns:text:1.0"
                 xmlns:draw="urn:oasis:names:tc:opendocument:xmlns:drawing:1.0">

 <rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
          xmlns:dc="http://purl.org/dc/elements/1.1/">
  <rdf:Description rdf:nodeID="graphics01"> 
   <dc:creator>Mr. X</dc:creator>
  </rdf:Description>
 </rdf:RDF>

 <office:body>
  <office:text>
   <text:p>This
      <draw:frame>
        <draw:image rdf:nodeID="graphics01">
         <office:binary-data>...</office:binary-data>
        </draw:image>
      </draw:frame>
      has metadata.</text:p>
  </office:text>
 </office:body>

</office:document>

Sample (external RDF stream)

<office:office:document-content>
 <office:body>
  <office:text>
   <text:p>
   This <draw:frame><draw:image xml:id="graphics01" xlink:href="Pictures/samplepic.png"/></draw:frame> has metadata. 
   </text:p>
  </office:text>
 </office:body>
</office:office:document-content>
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
         xmlns:dc="http://purl.org/dc/elements/1.1/">
<rdf:Description rdf:about="content.xml#graphics01"> 
   <dc:creator>Mr. X</dc:creator>
</rdf:Description>
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
         xmlns:dc="http://purl.org/dc/elements/1.1/">
<rdf:Description rdf:about="Pictures/samplepic.png"> 
   <dc:creator>Mr. X</dc:creator>
</rdf:Description>

Sample (RDFa)

(not possible)

Personal tools