Programming SVG Advanced Access Using Metadata and Fuzzy Sets

Non-visual Communication of Visual Content

Keywords: metadata, fuzzy sets, paper

David Dodds, Mr
Founder
DDWyndham
Vancouver
British Columbia
Canada
david_dodds_2001@yahoo.com

Biography

David Dodds has worked with computers since 1968, when he wrote Continuous Systems Models (CSMP) on IBM mainframe computers at university. Later he worked at Nortel (Northern Telecom Bell Northern Research) where he designed GUI and wrote text understanding software, these were in-house projects to allow extraction of content from telephony specification documents for use by graphical-interface programs, and he also wrote expert systems in C and Prolog. He has been working the last several years on the various emerging XML technologies, was on the W3C SVG workgroup to develop the specification for SVG 1.0, and on the Idealliance committee to develop XML Topic Map (XTM) specifcation. David has published numerous papers in robotics and on fuzzy systems. Two of these papers were published in the SPIE proceedings Space Station Automation III. Most recently he was co-author of the book WROX Professional XML Meta Data. He also worked as technical reviewer for Kurt Cagle's SVG book.


Abstract


SVG is an XML namespace which is used to represent graphics and animation. This representational capability allows GIS data information to be mapped to SVG elements and thereby display visuals (both GIS and 'diagram') on screen or paper.

This paper and its related tutorial discusses how metadata and also Fuzzy Sets can augment SVG GIS and SVG diagrams. SVG 1.0 is designed with internal embedded metadata capability principally through its "metadata" element. While RDF is (considered to be) the default metadata language, the SVG metadata element allows other metadata representations, such as XTM, DAML-OIL, and XGMML, in addition to RDF.

This author has shown, in previous papers, usage of mixed mode metadata, where a single SVG file contained both XML RDF and Topic Map metadata. This author's example of metadata in the SVG 1.0 Specification illustrates mixed mode metadata.

In SVG, metadata is text placed in the SVG metadata element. Metadata information may be placed in the SVG Title and Description elements also because of the namespace capability, however, this author does not believe this is a good practice.

Because the SVG parser does not attempt to use the metadata we are free to have any number of external metadata processors. This makes it practical and convenient to augment (use of) RDF with metadata representations that are 'kinder'. This paper shows use of RDF(S) and XTM. RDF metadata is created to show what it is and what it can represent for SVG. (including illustration of W3C's 'Linearization' approach.) This paper then goes on to show how RDF predicates can be used as locators of the facts they describe. SVG pictures are shown "parsed" for content using RDF facts, and fuzzy set parameterization. XTM topic maps are shown to display what they are and what they can represent for SVG, which is quite a bit. They add a dimension of searchability/access not available from RDF.

Fuzzy Sets are a branch of mathematics pioneered by Lotfi Zadeh at Berkeley University California. Many papers have been written about the mathematical details as to how fuzzy sets are computed and applied to various representational problems, by Zadeh, Mamdani, Sugeno and others. This author had a paper on fuzzy set application recommended for publication in an international technical journal. The paper was how to use fuzzy sets to describe spatial constructs using situatedness. In this paper we see using fuzzy sets for adding non-binary spatial and temporal constructs to SVG descriptions, permitting continuous accessibility.

Fuzzy Sets are a bone fide way of consistantly handling problems caused by First Order Predicate Logic's "Law of the Excluded Middle" (whereby the values can only be either 0 or 1 and nothing exists in between.) Of course the real world is continuous not binary. This paper shows use RDF(S) representation of spatiality and SVG object relationship and how application of Zadeh's fuzzy set mathematics overcomes RDF's everything is "black or white".

An SVG diagram (a "business chart" and an electronic circuit schematic) and an SVG animation are presented and the code is shown / explained which adds metadata to these visuals and also the practical use of fuzzy sets, which is the parameterization of RDF's predicates, and to provide a continuous measure rather than RDF's binary one. XGMML is shown as a network representation of 'significant' visual information, which is searchable and castable to RDF or other metadata representations.

The methodology for serializing ascription of SVG visual content (ie making natural language text from the picture itself) is shown (including 'non-linear' contexts). Each of the sections of this paper have accompanying code shown during the presentation.

Creating some fuzzy sets and displaying them with SVG is shown and explained. The SVG display allows for immediate understanding of how fuzzy sets augment the accessability of SVG visual content. Fuzzy set information can also be serialized and output as text or text-to-speech voice.

We see the creating of XGMML XML structures from SVG files. The paper also presents creating XGMML XML structures from RDF


Table of Contents


1. The Use of Metadata and Fuzzy Sets in Advanced Representation

1. The Use of Metadata and Fuzzy Sets in Advanced Representation

SVG is an XML namespace which is used to represent graphics and animation. This representational capability allows GIS data / information to be mapped to SVG elements and thereby display visuals (both GIS and 'diagram') on screen or paper.

This paper discusses how metadata and also Fuzzy Sets can augment SVG / diagrams. SVG 1.0 is designed with internal / embedded metadata capability principally through its "metadata" element. While RDF is (considered to be) the default metadata language, the SVG metadata element allows other metadata representations, such as XTM, DAML-OIL, and XGMML, in addition to RDF.

First we look at some examples of these varieties of metadata.

Next is a brief example of RDF, this particular example uses the Dublin Core (DC)metadata set to provide information about an object or concept, known in RDF as an RDF resource. The DC is meant to be a sort of metadata standard for providing certain kinds of information. It is also possible to provide similar type information by using an alternative metadata representation such as XTM (XML Topic Maps).

Examining this code we see that there is (RDF) metadata-style representation for a description which consists of a title, creator, description, and a date.

<?xml version="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 about="http://purl.org/dc/elements/1.1/">
          <dc:title>The Dublin Core Element Set Version 1.1</dc:title>
          <dc:creator>Dublin Core Metadata Inititative</dc:creator> 
          <dc:description>The Dublin Core is a simple metadata element
            set intended to facilitate discovery of electronic
            resources.  This document presents the proposed new 
            definitions for the Dublin Core metadata elements.</dc:description> 
          <dc:date>1999-07-02</dc:date>
       </rdf:Description>
     </rdf:RDF>

Here are some brief snippets of XTM taken from the topicmaps.org XTM file called music.xtm.

<?xml version="1.0" encoding="ISO-8859-1"?>
     <!DOCTYPE topicMap SYSTEM "xtm1.dtd">
     <topicMap xmlns="http://www.topicmaps.org/xtm/1.0/" xmlns:xlink="http://www.w3.org/1999/xlink">
         <topic id="st-music">
             <baseName>
                 <baseNameString>Music</baseNameString>
             </baseName>
         </topic>
         <topic id="normalised">
             <baseName>
                 <baseNameString>Normalised</baseNameString>
             </baseName>
         </topic>
         <topic id="tt-person">
             <baseName>
                 <baseNameString>Person</baseNameString>
             </baseName>
         </topic>
         <topic id="tt-artist">
             <instanceOf>
                 <topicRef xlink:href="#tt-person"/>
             </instanceOf>
             <baseName>
                 <baseNameString>Artist</baseNameString>
             </baseName>
              <topic id="tt-dub">
     	        <instanceOf>
     	            <topicRef xlink:href="#tt-music"/>
     	        </instanceOf>
     	        <baseName>
     	            <baseNameString>Dub</baseNameString>
     	            <variant>
     	                <parameters>
     	                    <topicRef xlink:href="http://www.topicmaps.org/xtm/1.0/#psi-sort"/>
     	                </parameters>
     	                <variantName>
     	                    <resourceData id="Ne3-Ne6">dub</resourceData>
     	                </variantName>
     	            </variant>
     	            <variant>
     	                <parameters>
     	                    <topicRef xlink:href="http://www.topicmaps.org/xtm/1.0/#psi-sort"/>
     	                </parameters>
     	                <variantName>
     	                    <resourceData id="Ne3-Neb">Dub</resourceData>
     	                </variantName>
                 </variant>
                 
     <association id="N2dd">
             <instanceOf>
                 <topicRef xlink:href="#at-member-of"/>
             </instanceOf>
             <scope>
                 <topicRef xlink:href="#st-music"/>
             </scope>
             <member>
                 <roleSpec>
                     <topicRef xlink:href="#tt-band"/>
                 </roleSpec>
                 <topicRef xlink:href="#t-the-clash"/>
             </member>
             <member>
                 <roleSpec>
                     <topicRef xlink:href="#tt-vocalist"/>
                 </roleSpec>
                 <topicRef xlink:href="#t-mick-jones"/>
                 <topicRef xlink:href="#t-joe-strummer"/>
             </member>
     </topicMap>

Next is an example of DAML-OIL, this particular example provides information for the predicates in the CYC system, a very large program-usable knowledge base about general everyday background information, actions, and social relations. DAML-OIL is an extension of RDF. Examining this code we see that it looks a lot like RDF at first glance. The type of metadata in a system such as CYC is very important to providing a computer with knowledge of things and their relationships, which is paramount for any linguistic or intelligent program use to be enabled.

<?xml version='1.0' encoding='ISO-8859-1'?>
     <!DOCTYPE rdf:RDF [
     	 <!ENTITY rdf 'http://www.w3.org/1999/02/22-rdf-syntax-ns#'>
     	 <!ENTITY a 'http://www.daml.org/2000/12/daml+oil#'>
     	 <!ENTITY b 'http://www.w3.org/1999/02/22-rdf-schema-ns#'>
     	 <!ENTITY c 'http://www.cyc.com/cyc-2-1/vocab/fundamental-vocab#'>
     ]>
     <rdf:RDF xmlns:rdf="&rdf;"
     	 xmlns:a="&a;"
     	 xmlns:b="&b;"
     	 xmlns:c="&c;">
     <rdf:Description rdf:about="&c;BinaryPredicate">
     	<a:sameClassAs rdf:resource="&a;Property"/>
     </rdf:Description>
     <rdf:Description rdf:about="&c;Collection">
     	<a:sameClassAs rdf:resource="&a;Class"/>
     </rdf:Description>
     <rdf:Description rdf:about="&c;TransitiveBinaryPredicate">
     	<a:sameClassAs rdf:resource="&a;TransitiveProperty"/>
     </rdf:Description>
     <rdf:Description rdf:about="&c;arg1Isa">
     	<a:samePropertyAs rdf:resource="&a;domain"/>
     </rdf:Description>
     <rdf:Description rdf:about="&c;arg2Isa">
     	<a:samePropertyAs rdf:resource="&a;range"/>
     </rdf:Description>
     <rdf:Description rdf:about="&c;coExtensional">
     	<a:samePropertyAs rdf:resource="&a;sameClassAs"/>
     </rdf:Description>
     <rdf:Description rdf:about="&c;disjointWith">
     	<a:samePropertyAs rdf:resource="&a;disjointWith"/>
     </rdf:Description>
     <rdf:Description rdf:about="&c;equals">
     	<a:samePropertyAs rdf:resource="&a;equivalentTo"/>
     	<a:samePropertyAs rdf:resource="&a;samePropertyAs"/>
     </rdf:Description>
     <rdf:Description rdf:about="&c;genlPreds">
     	<a:samePropertyAs rdf:resource="&a;subPropertyOf"/>
     </rdf:Description>
     <rdf:Description rdf:about="&c;genls">
     	<a:samePropertyAs rdf:resource="&a;subClassOf"/>
     </rdf:Description>
     <rdf:Description rdf:about="&c;isa">
     	<a:samePropertyAs rdf:resource="&b;type"/>
     </rdf:Description>
     </rdf:RDF>
     
     
     
     <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
     <!-- saved from url=(0044)http://www.daml.org/2001/03/daml+oil-ex.daml -->
     <HTML><HEAD>
     <META http-equiv=Content-Type content="text/html; charset=windows-1252">
     <META content="MSHTML 5.50.4522.1800" name=GENERATOR></HEAD>
     <BODY><XMP><!-- $Revision: 1.8 $ of $Date: 2001/03/27 21:24:04 $ -->
     
     <rdf:RDF
       xmlns:rdf ="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
       xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#"
       xmlns:daml="http://www.daml.org/2001/03/daml+oil#"
       xmlns:xsd ="http://www.w3.org/2000/10/XMLSchema#"
       xmlns:dex ="http://www.daml.org/2001/03/daml+oil-ex#"
       xmlns:exd ="http://www.daml.org/2001/03/daml+oil-ex-dt#"
       xmlns     ="http://www.daml.org/2001/03/daml+oil-ex#"
     >
     
     <daml:Ontology rdf:about="">
       <daml:versionInfo>$Id: daml+oil-ex.daml,v 1.8 2001/03/27 21:24:04 horrocks Exp $</daml:versionInfo>
       <rdfs:comment>
         An example ontology, with data types taken from XML Schema
       </rdfs:comment>
       <daml:imports rdf:resource="http://www.daml.org/2001/03/daml+oil"/>
     </daml:Ontology>
     
     <daml:Class rdf:ID="Animal">
       <rdfs:label>Animal</rdfs:label>
       <rdfs:comment>
         This class of animals is illustrative of a number of ontological idioms.
       </rdfs:comment>
     </daml:Class>
     
     <daml:Class rdf:ID="Male">
       <rdfs:subClassOf rdf:resource="#Animal"/>
     </daml:Class>
     
     <daml:Class rdf:ID="Female">
       <rdfs:subClassOf rdf:resource="#Animal"/>
       <daml:disjointWith rdf:resource="#Male"/>
     </daml:Class>
     
     <daml:Class rdf:ID="Man">
       <rdfs:subClassOf rdf:resource="#Person"/>
       <rdfs:subClassOf rdf:resource="#Male"/>
     </daml:Class>
     
     <daml:Class rdf:ID="Woman">
       <rdfs:subClassOf rdf:resource="#Person"/>
       <rdfs:subClassOf rdf:resource="#Female"/>
     </daml:Class>
     
     <daml:ObjectProperty rdf:ID="hasParent">
       <rdfs:domain rdf:resource="#Animal"/>
       <rdfs:range rdf:resource="#Animal"/>
     </daml:ObjectProperty>
     
     <daml:ObjectProperty rdf:ID="hasFather">
       <rdfs:subPropertyOf rdf:resource="#hasParent"/>
       <rdfs:range rdf:resource="#Male"/>
     </daml:ObjectProperty>
     
     <daml:DatatypeProperty rdf:ID="shoesize">
       <rdfs:comment>
         shoesize is a DatatypeProperty whose range is xsd:decimal.
         shoesize is also a UniqueProperty (can only have one shoesize)
       </rdfs:comment>
       <rdf:type rdf:resource="http://www.daml.org/2001/03/daml+oil#UniqueProperty"/>
       <rdfs:range rdf:resource="http://www.w3.org/2000/10/XMLSchema#decimal"/>
     </daml:DatatypeProperty>
     
     <daml:DatatypeProperty rdf:ID="age">
       <rdfs:comment>
         age is a DatatypeProperty whose range is xsd:decimal.
         age is also a UniqueProperty (can only have one age)
       </rdfs:comment>
       <rdf:type rdf:resource="http://www.daml.org/2001/03/daml+oil#UniqueProperty"/>
       <rdfs:range rdf:resource="http://www.w3.org/2000/10/XMLSchema#nonNegativeInteger"/>
     </daml:DatatypeProperty>
     
     <daml:Class rdf:ID="Person">
       <rdfs:subClassOf rdf:resource="#Animal"/>
       <rdfs:subClassOf>
         <daml:Restriction>
           <daml:onProperty rdf:resource="#hasParent"/>
           <daml:toClass rdf:resource="#Person"/>
         </daml:Restriction>
       </rdfs:subClassOf>
       <rdfs:subClassOf>
         <daml:Restriction daml:cardinality="1">
           <daml:onProperty rdf:resource="#hasFather"/>
         </daml:Restriction>
       </rdfs:subClassOf>
       <rdfs:subClassOf>
         <daml:Restriction>
           <daml:onProperty rdf:resource="#shoesize"/>
           <daml:minCardinality>1</daml:minCardinality>
         </daml:Restriction>
       </rdfs:subClassOf>
     </daml:Class>
     
     <daml:Class rdf:about="#Animal">
       <rdfs:comment>
         Animals have exactly two parents, ie:
         If x is an animal, then it has exactly 2 parents 
         (but it is NOT the case that anything that has 2 parents is an animal).
       </rdfs:comment>
       <rdfs:subClassOf>
         <daml:Restriction daml:cardinality="2">
           <daml:onProperty rdf:resource="#hasParent"/>
         </daml:Restriction>
       </rdfs:subClassOf>
     </daml:Class>
     
     <daml:Class rdf:about="#Person">
       <rdfs:subClassOf>
         <daml:Restriction daml:maxCardinality="1">
           <daml:onProperty rdf:resource="#hasSpouse"/>
         </daml:Restriction>
       </rdfs:subClassOf>
     </daml:Class>
     
     <daml:Class rdf:about="#Person">
       <rdfs:subClassOf>
         <daml:Restriction daml:maxCardinalityQ="1">
           <daml:onProperty rdf:resource="#hasOccupation"/>
           <daml:hasClassQ rdf:resource="#FullTimeOccupation"/>
         </daml:Restriction>
       </rdfs:subClassOf>
     </daml:Class>
     
     <daml:UniqueProperty rdf:ID="hasMother">
       <rdfs:subPropertyOf rdf:resource="#hasParent"/>
       <rdfs:range rdf:resource="#Female"/>
     </daml:UniqueProperty>
     
     <daml:ObjectProperty rdf:ID="hasChild">
       <daml:inverseOf rdf:resource="#hasParent"/>
     </daml:ObjectProperty>
     
     <daml:TransitiveProperty rdf:ID="hasAncestor">
       <rdfs:label>hasAncestor</rdfs:label>
     </daml:TransitiveProperty>
     
     <daml:TransitiveProperty rdf:ID="descendant"/>
     
     <daml:ObjectProperty rdf:ID="hasMom">
       <daml:samePropertyAs rdf:resource="#hasMother"/>
     </daml:ObjectProperty>
     
     <daml:Class rdf:ID="Car">
       <rdfs:comment>no car is a person</rdfs:comment>
       <rdfs:subClassOf>
         <daml:Class>
           <daml:complementOf rdf:resource="#Person"/>
         </daml:Class>
       </rdfs:subClassOf>
     </daml:Class>
     
     <!-- @@CAVEAT: daml:collection is an extension of RDF 1.0 syntax;
          don't expect existing tools to support it. 
          See http://www.daml.org/2001/03/reference.html#collection for details.
     -->
     
     <daml:Class rdf:about="#Person">
       <rdfs:comment>every person is a man or a woman</rdfs:comment>
       <daml:disjointUnionOf rdf:parseType="daml:collection">
         <daml:Class rdf:about="#Man"/>
         <daml:Class rdf:about="#Woman"/>
       </daml:disjointUnionOf>
     </daml:Class>
     
     <daml:Class rdf:ID="TallMan">
       <daml:intersectionOf rdf:parseType="daml:collection">
         <daml:Class rdf:about="#TallThing"/>
         <daml:Class rdf:about="#Man"/>
       </daml:intersectionOf>
     </daml:Class>
     
     <daml:Class rdf:ID="MarriedPerson">
       <daml:intersectionOf rdf:parseType="daml:collection">
         <daml:Class rdf:about="#Person"/>
         <daml:Restriction daml:cardinality="1">
           <daml:onProperty rdf:resource="#hasSpouse"/>
         </daml:Restriction>
       </daml:intersectionOf>
     </daml:Class>
     
     <daml:Class rdf:ID="HumanBeing">
       <daml:sameClassAs rdf:resource="#Person"/>
     </daml:Class>
     
     <daml:Class rdf:ID="Adult">
       <daml:intersectionOf rdf:parseType="daml:collection">
         <daml:Class rdf:about="#Person"/>
         <daml:Restriction>
           <daml:onProperty rdf:resource="#age"/>
           <daml:hasClass rdf:resource="http://www.daml.org/2001/03/daml+oil-ex-dt#over17"/>
         </daml:Restriction>
       </daml:intersectionOf>
     </daml:Class>
     
     <daml:Class rdf:ID="Senior">
       <daml:intersectionOf rdf:parseType="daml:collection">
         <daml:Class rdf:about="#Person"/>
         <daml:Restriction>
           <daml:onProperty rdf:resource="#age"/>
           <daml:hasClass rdf:resource="http://www.daml.org/2001/03/daml+oil-ex-dt#over59"/>
         </daml:Restriction>
       </daml:intersectionOf>
     </daml:Class>
     
     <Person rdf:ID="Adam">
       <rdfs:label>Adam</rdfs:label>
       <rdfs:comment>Adam is a person.</rdfs:comment>
       <age><xsd:integer rdf:value="13"/></age>
       <shoesize><xsd:decimal rdf:value="9.5"/></shoesize>
     </Person>
     
     <daml:ObjectProperty rdf:ID="hasHeight">
       <rdfs:range rdf:resource="#Height"/>
     </daml:ObjectProperty>
     
     <daml:Class rdf:ID="Height">
       <daml:oneOf rdf:parseType="daml:collection">
         <Height rdf:ID="short"/>
         <Height rdf:ID="medium"/>
         <Height rdf:ID="tall"/>
       </daml:oneOf>
     </daml:Class>
     
     <!-- TallThing is EXACTLY the class of things whose hasHeight is tall -->
     
     <daml:Class rdf:ID="TallThing">
       <daml:sameClassAs>
         <daml:Restriction>
           <daml:onProperty rdf:resource="#hasHeight"/>
           <daml:hasValue rdf:resource="#tall"/>
         </daml:Restriction>
       </daml:sameClassAs>
     </daml:Class>
     
     <daml:DatatypeProperty rdf:ID="shirtsize">
       <rdfs:comment>
         shirtsize is a DatatypeProperty whose range is clothingsize.
       </rdfs:comment>
       <rdf:type rdf:resource="http://www.daml.org/2001/03/daml+oil#UniqueProperty"/>
       <rdfs:range rdf:resource="http://www.daml.org/2001/03/daml+oil-ex-dt#clothingsize"/>
     </daml:DatatypeProperty>
     
     <daml:DatatypeProperty rdf:ID="associatedData">
       <rdfs:comment>
       associatedData is a DatatypeProperty without a range restriction.
       </rdfs:comment>
     </daml:DatatypeProperty>
     
     <rdfs:Class rdf:ID="BigFoot">
       <rdfs:comment>
       BigFoots (BigFeet?) are exactly those persons whose shosize is over12.
       </rdfs:comment>
       <daml:intersectionOf rdf:parseType="daml:collection">
         <rdfs:Class rdf:about="#Person"/>
         <daml:Restriction>
           <daml:onProperty rdf:resource="#shoesize"/>
           <daml:hasClass rdf:resource="http://www.daml.org/2001/03/daml+oil-ex-dt#over12"/>
         </daml:Restriction>
       </daml:intersectionOf>
     </rdfs:Class>
     
     <Person rdf:ID="Ian">
       <rdfs:comment>
       Ian is an instance of Person. Ian has shoesize 14 and age 37. From
       the range restrictions we know that these are of type xsd:decimal
       and xsd:nonNegativeInteger respectively. Ian also has shirtsize 12,
       the type of which is the union type clothingsize; the discriminating
       type "string" has been specified, so the value is to be taken as the
       string "12" rather than the integer 12.  We may be able to infer
       that Ian is an instance of BigFoot (because 14 is a valid value for
       xsd:over12).
       </rdfs:comment>
       <shoesize>14</shoesize>
       <age>37</age>
       <shirtsize><xsd:string rdf:value="12"/></shirtsize>
     </Person>
     
     <Person rdf:ID="Peter">
       <rdfs:comment>
       Peter is an instance of Person. Peter has shoesize 9.5 and age 46. From the
       range restrictions we know that these are of type xsd:decimal and 
       xsd:nonNegativeInteger respectively. Peter also has shirtsize 15, the type 
       of which is the union type clothingsize; no discriminating type
       has been specified, so the value may be either a string or an integer.
       </rdfs:comment>
       <shoesize>9.5</shoesize>
       <age>46</age>
       <shirtsize>15</shirtsize>
     </Person>
     
     <daml:DatatypeProperty rdf:ID="associatedData">
       <rdfs:comment>
       associatedData is a DatatypeProperty without a range restriction.
       </rdfs:comment>
     </daml:DatatypeProperty>
     
     <daml:Class rdf:about="#Person">
       <rdfs:comment>
       Persons have at most 1 item of associatedData
       </rdfs:comment>
        <rdfs:subClassOf>
           <daml:Restriction>
             <daml:onProperty rdf:resource="#associatedData"/>
             <daml:maxCardinality>1</daml:maxCardinality>
           </daml:Restriction>
        </rdfs:subClassOf>
     </daml:Class>
     
     <Person rdf:ID="Santa">
       <rdfs:comment>
       Santa is an instance of Person. Santa has two pieces of
       associatedData, one of which is the real number 3.14159 and the
       other of which is the string "3.14159". We may be able to infer a
       logical inconsistency (because Persons can have at most 1 item of
       associatedData, and a value cannot be both a string and a real
       number).
       </rdfs:comment>
       <associatedData><xsd:real rdf:value="3.14159"/></associatedData>
       <associatedData><xsd:string rdf:value="3.14159"/></associatedData>
     </Person>
     
     </rdf:RDF>
     </XMP></BODY></HTML>

The DAML-OIL example above is also used as an example of knowledge base required to both understand diagrams (and GIS constructs) and aid in performing functional linguistic processing by providing (at least part of) the "background knowledge", or "world knowledge" that language users call upon when they formulate sentences.

Here is a brief example of XGMML (XML Graph Modeling and Markup Language), this particular example provides information about computer courses at a technical institute. Notice that RDF is used in this particular XGMML code example, RDF is used in XGMML attributes to convey course information packaged, by use of the Dublin Core metadata set. The RDF/DC is information associated with XGMML graph nodes ( having "names" id=1, id=3, id=7, id=8). What this XGMML example shows is that RDF / DC (or most any) metadata can be organized as "bags" or "collections" by means of putting them into a graph structure as node data.

<?xml version="1.0"?>
<graph xmlns = "http://www.cs.rpi.edu/XGMML"
       directed="1" >
<node id="3" label="http://www.cs.rpi.edu/courses/" weight="5427">
<att>
<rdf:RDF
  xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
  xmlns:dc="http://purl.org/dc/elements/1.0/">
  <rdf:Description about="http://www.cs.rpi.edu/courses/"
    dc:title="Courses at Rensselaer Computer Science
    Department"
    dc:subject="www@cs.rpi.edu; M.S. requirements; CSCI-1190
    Beginning C Programming for Engineers; Courses; People;
    Graduate Program; CSCI-4020 Computer  Algorithms; CSCI-
    2220-01  Programming in Java; Research; Course Selection
    Guide; CSCI-4961-01,  CSCI-6961-01 Advanced Robotics; 
    Programming in Java; CSCI-2400 Models  of Computation"
    dc:date="2000-01-31"
    dc:type="Text"
    >
    <dc:format>
      <rdf:Bag
        rdf:_1="text/html"
        rdf:_2="5427 bytes"
      />
    </dc:format>
  </rdf:Description>
</rdf:RDF>
</att>
</node>
<node id="7" label="http://www.cs.rpi.edu/research/" weight="5508">
<att>
<rdf:RDF
  xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
  xmlns:dc="http://purl.org/dc/elements/1.0/">
  <rdf:Description about="http://www.cs.rpi.edu/research/"
    dc:title="Research at Rensselaer Computer Science
    Department"
    dc:subject="www@cs.rpi.edu; Computing  Twin Primes and
    Brun's Constant; Generic Programming; ASHE; Current
    Events; TEMPEST; Courses; People; Graduate Program; High-
    Performance  Object-Oriented Programming in Fortran 90;
    High Performance  Problem-Solving Environment for
    Optimization and Control of  Chemical and Biological
    Processes; Computer Vision; Theory and Algorithms;
    technical report library; RPInfo; Undergraduate  Program;
    Research; Research; Design Conference Room; Rensselaer;
    Bryan Rudge; Engineering Databases; anonymous ftp; I.SEE;
    info@cs.rpi.edu; Scientific Computing; OpenMath; Proactive
    Network Problem Avoidance; Computing   Facilities; Computer
    Science Department"
    dc:date="1999-11-19"
    dc:type="Text"
    >
    <dc:format>
      <rdf:Bag
        rdf:_1="text/html"
        rdf:_2="5508 bytes"
      />
    </dc:format>
  </rdf:Description>
</rdf:RDF>
</att>
</node>
<node id="8" label="http://www.cs.rpi.edu/undergrad/" weight="7511">
<att>
<rdf:RDF
  xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
  xmlns:dc="http://purl.org/dc/elements/1.0/">
  <rdf:Description about="http://www.cs.rpi.edu/undergrad/"
    dc:title="Undergraduate Program at Rensselaer Computer
    Science Department"
    dc:subject="www@cs.rpi.edu; Association for Computing
    Machinery; People; Graduate Program; Minor; Prospective
    Students FAQ; Admissions Office; Research; BS-MS Degree;
    Rensselaer Catalog; Dual Majors; Admissions; ; Computing
    Facilities; Undergraduate  Program; Rensselaer; Course  
    Descriptions;Computer Science Department"
    dc:date="2000-01-26"
    dc:type="Text"
    >
    <dc:format>
      <rdf:Bag
        rdf:_1="text/html"
        rdf:_2="7511 bytes"
      />
    </dc:format>
  </rdf:Description>
</rdf:RDF>
</att>
</node>
<node id="1" label="http://www.cs.rpi.edu/" weight="3352">
<att>
<rdf:RDF
  xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
  xmlns:dc="http://purl.org/dc/elements/1.0/">
  <rdf:Description about="http://www.cs.rpi.edu/"
    dc:title="Rensselaer Computer Science Department"
    dc:subject="www@cs.rpi.edu; faculty positions; Rensselaer;
    Bryan Rudge; Computing Facilities; Courses; People;
    Graduate Program; info@cs.rpi.edu; Current Events; ;
    RPInfo; Research; Undergraduate  Program"
    dc:date="2000-01-26"
    dc:type="Text"
    >
    <dc:format>
      <rdf:Bag
        rdf:_1="text/html"
        rdf:_2="3352 bytes"
      />
    </dc:format>
  </rdf:Description>
</rdf:RDF>
</att>
</node>
<edge source="1" target="3" weight="0" label="SRC IMG gfx/courses2.jpg" />
<edge source="7" target="3" weight="0" label="SRC IMG ../gfx/courses2.jpg" />
<edge source="8" target="3" weight="0" label="SRC IMG ../gfx/courses2.jpg" />
<edge source="3" target="7" weight="0" label="SRC IMG ../../gfx/research2.jpg" />
<edge source="1" target="7" weight="0" label="SRC IMG gfx/research2.jpg" />
<edge source="8" target="7" weight="0" label="SRC IMG ../gfx/research2.jpg" />
<edge source="3" target="8" weight="0" label="SRC IMG ../../gfx/ugrad2.jpg" />
<edge source="7" target="8" weight="0" label="SRC IMG ../gfx/ugrad2.jpg" />
<edge source="1" target="8" weight="0" label="SRC IMG gfx/ugrad2.jpg" />
<edge source="3" target="1" weight="0" label="SRC IMG ../../gfx/corner2.jpg" />
<edge source="7" target="1" weight="0" label="SRC IMG ../gfx/corner2.jpg" />
<edge source="8" target="1" weight="0" label="SRC IMG ../gfx/corner2.jpg" />
</graph>

This author has shown, in previous papers, usage of mixed mode metadata, where a single SVG file contained both XML RDF and Topic Map metadata. This author's example of metadata in the SVG 1.0 Specification illustrates mixed mode metadata.

In SVG, metadata is text placed in the SVG metadata element. Metadata information may be placed in the SVG Title and Description elements also because of the namespace capability, however, this author does not believe this is a good practice.

Because the SVG parser does not attempt to use the metadata we are free to have any number of external metadata processors. This makes it practical and convenient to augment (use of) RDF with metadata representations that are 'kinder'. This paper shows use of RDF(S). RDF metadata is created to show what it is and what it can represent for SVG.

Our next example is SVG file, barchart, look at its picture using an SVG viewer, such as Adobe's I.E. plug-in. The SVG code for barchart, which includes relevant examples of RDF, is listed below:

<?xml version="1.0" standalone="yes" ?>
<svg xmlns = 'http://www.w3.org/2000/svg'>
<metadata xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
          xmlns:rdfs="http://www.w3.org/TR/. ..-schema#" 
          xmlns:daxsvg="http://www.openmeta.org/daxschema/" >
  <rdf:Description about="#text1">
     <daxsvg:Below resource="#xbaseline"/>
  </rdf:Description>
  <rdf:Description about="#text1">
     <daxsvg:IsNear resource="#xbaseline" />
  </rdf:Description>
  <rdf:Description about="#text2">
     <daxsvg:Below resource="#text1"/>
  </rdf:Description>
  <rdf:Description about="#text2">
     <daxsvg:IsNear resource="#text1" />
  </rdf:Description>
  <rdf:Description about="#endlineleft">
     <daxsvg:AtRight resource="#line1"/>
  </rdf:Description>
  <rdf:Description about="#endlineleft">
     <daxsvg:IsNear resource="#line1" />
  </rdf:Description>
  <rdf:Description about="#endlineright">
     <daxsvg:AtLeft resource="#bar13"/>
  </rdf:Description>
  <rdf:Description about="#endlineright">
     <daxsvg:IsNear resource="#bar13" />
  </rdf:Description>
  <rdf:Description about="#line1">
     <daxsvg:AtRight resource="#line2" />
  </rdf:Description>
  <rdf:Description about="#line2">
     <daxsvg:AtRight resource="#line3" />
  </rdf:Description>
  <rdf:Description about="#line3">
     <daxsvg:AtRight resource="#line4" />
  </rdf:Description>
  <rdf:Description about="#line4">
     <daxsvg:AtRight resource="#line5" />
  </rdf:Description>
  <rdf:Description about="#line5">
     <daxsvg:AtRight resource="#line6" />
  </rdf:Description>
  <rdf:Description about="#line6">
     <daxsvg:AtRight resource="#line7" />
  </rdf:Description>
  <rdf:Description about="#line7">
     <daxsvg:AtRight resource="#line8" />
  </rdf:Description>
  <rdf:Description about="#line8">
     <daxsvg:AtRight resource="#line9" />
  </rdf:Description>
  <rdf:Description about="#line9">
     <daxsvg:AtRight resource="#line10" />
  </rdf:Description>
  <rdf:Description about="#line10">
     <daxsvg:AtRight resource="#line11" />
  </rdf:Description>
  <rdf:Description about="#line11">
     <daxsvg:AtRight resource="#line12" />
  </rdf:Description>
</metadata>
<rect id="lineval18" x="37" y="190" width="280" height="1" style="stroke:black; stroke-width:1" />
<text id="text3" x="317" y="194"
   style="font-family:Verdana; font-size:12.333; fill:indigo">
18
</text>
<rect id="xbaseline" x="37" y="200" width="329" height="1" style="stroke:blue; stroke-width:1" />
<rect id="endlineright" x="333" y="96" width="1" height="104" style="stroke:black; stroke-width:1" />
<rect id="endlineleft" x="37" y="96" width="1" height="104" style="stroke:black; stroke-width:1" />
<rect id="line1" x="40" y="160" width="20" height="40" style="stroke:green; fill:green; stroke-width:0" />
<rect id="line2" x="60" y="140" width="20" height="60" style="stroke:yellow; fill:yellow; stroke-width:0" />
<rect id="line3" x="80" y="111" width="20" height="89" style="stroke:red; fill:red; stroke-width:0" />
<rect id="line4" x="100" y="130" width="20" height="70" style="stroke:yellow; fill:yellow; stroke-width:0" />
<rect id="line5" x="120" y="173" width="20" height="27" style="stroke:green; fill:green; stroke-width:0" />
<rect id="line6" x="140" y="191" width="20" height="09" style="stroke:green; fill:green; stroke-width:0" />
<rect id="line7" x="160" y="140" width="20" height="60" style="stroke:yellow; fill:yellow; stroke-width:0" />
<rect id="line8" x="180" y="167" width="20" height="33" style="stroke:green; fill:green; stroke-width:0" />
<rect id="line9" x="200" y="175" width="20" height="25" style="stroke:green; fill:green; stroke-width:0" />
<rect id="line10" x="220" y="129" width="20" height="71" style="stroke:yellow; fill:yellow; stroke-width:0" />
<rect id="line11" x="240" y="150" width="20" height="50" style="stroke:green; fill:green; stroke-width:0" />
<rect id="line12" x="260" y="139" width="20" height="61" style="stroke:yellow; fill:yellow; stroke-width:0" />
<rect id="line13" x="280" y="125" width="20" height="75" style="stroke:yellow; fill:yellow; stroke-width:0" />
<text id="text1" x="37" y="210"
   style="font-family:Verdana; font-size:12.333; fill:black">
87  88  89  90  91  92  93  94  95  96  97  98  99
</text>
<text id="text2" x="37" y="230"
   style="font-family:Verdana; font-size:12.333; fill:brown">
Mean High Ratings August 1999
</text>
</svg>

What we see in the SVG program above is that SVG has a built-in means of having metadata embedded right in the picture. Metadata goes beyond mere comments and conveniently worded text in SVG Titles and Descriptions, because the important difference is that metadata can be read and USED FUNCTIONALLY by other programs. Text in comments must be read and "understood" by a linguistic processor in order to be of any value beyond "display only". A linguistic processor which can functionally / usefully comprehend any arbitrary comment or description it comes across will be a rare find indeed.

Using metadata to represent self-knowledge

While it is possible to insert a text comment into a JPEG file, including an RDF description of the file, generally web graphics files contain little or no information ABOUT the picture, including its contents. Sometimes, but rather rarely, people insert a brief comment, perhaps the title string or legend string. It is still rare that graphics files, such as bitmaps, have any non-pixel data in them, not even dates, authors, etc.

Metadata, data about data, brings powerful capabilities to XML files, including SVG. In the XML world that standard representation of metadata is with RDF. Using RDF one can provide information about the picture. Using a controlled vocabulary, such as DC 1.1 Dublin Core, we can indicate such things as the author of the work, the date of creation and various other publication oriented information items.

Each of these metadata representations may be characterized by a description of their graph structures. A graph representation language, such as XGMML, can be used to describe the graph structure in a serialized way in XML. A computer executable, disciplined way to transcode between graph structures allows repurposing of RDF and XTM knowledge into the other representation.

SVG graphical objects each may take a metadata element, in addition to a title and description element. The default representation for metadata in SVG is RDF, and hence, it is possible to have an RDF based statement of metadata knowledge for each and every graphical object in SVG XML document instance

This SVG program consists of a collection of SVG rectangles and text lines, preceded by a metadata element containing RDF statements. The RDF statements use the daxsvg RDFSchema to describe relationships of named objects. The names are in the form of XML "id".

Some of the relationships represented in the overall system are:

Above, Below, AtRight, AtLeft, Beside, Behind, Higher, Lower, Near, Far, Inside, Outside, Convex, Concave, Straight, Curved, Circle, Rectangle, Path, Animate.

In the daxsvg RDFSchema these terms and others are used to represent their english word equivalent (in so far as RDF and first order logic can).

Here next are some of the daxsvg RDFSchema items used for inferencing the spatial perceptions in the above SVG picture.

<rdf:Property ID="AtRight">
	<rdfs:comment>has a degree of to the right (by value).  (uses context) g15(x)</rdfs:comment>
        <rdfs:range rdf:resource="#www.openmeta.org/2004/AtRight(x)"/>
        <rdfs:domain rdf:resource="#SvgEntity" />
</rdf:Property>

<rdf:Property ID="AtLeft">
	<rdfs:comment>has a degree of to the left (by value). (uses context) g16(x)</rdfs:comment>
        <rdfs:range rdf:resource="#www.openmeta.org/2004/AtLeft(x)"/>
        <rdfs:domain rdf:resource="#SvgEntity" />
</rdf:Property>

<rdf:Property ID="IsNear">
	<rdfs:comment>has a degree of nearness (by value). g1(x)</rdfs:comment>
        <rdfs:range rdf:resource="#www.openmeta.org/2004/IsNear(x)"/>
        <rdfs:domain rdf:resource="#SvgEntity" />
</rdf:Property>

This is how the W3C Linearization system works also, which uses their own RDFSchema vocabulary. They do not employ functions, such as the g# functions seen in the above RDF, they use unparameterized first order predicates.

This author's system goes beyond that approach, however, by also incorporating a means of having the effect of a paramaterization on the relationship, instead of it being solely true or false as in RDF. The paramaterization is accomplished using Lotfi Zadeh's Fuzzy Set Theory / Linguistic Variables. The linguistic variables occur in a context, which is explained in this paper and also explained in my WROX book Professional XML Meta Data. Code and data associated with this paper explaining situated linguistic variables and the parameterization of RDF predicates is available.

Next we will look at the function g15(x), which is the function our RDF comment tells us is used to process AtRight. It is not the comment that is read and executed. The comment is merely for consumption by the human eyeball in an informatory manner.

A Java code snippet follows. This code implements the simplest form of left-right distinction. If the value of variable X1 is greater than the value of variable X2 the function returns true, otherwise it returns false. What this means is the function returns a boolean value. In effect it implements a first order "to the right" distinction. Its response amounts to: the object corresponding to X1 either IS, or IS NOT, to the right of the object corresponding to X2. So far this is a computational version of the RDF AtRight first order predicate shown above, and which is used by my system (and ay be said to be used in the W3C Linearizer as well). X1 and X2 are the x axis origin values for each of the objects dealt with. (This in fact is not how my system does its processing.)

public boolean AtRight( int x1, int x2 )
        {
            if (x1 > x2 )
            {
                return true;
            }
            else
            {
                return false;
            }
        }

Both AtLeft and IsNear could be implemented using the same style of function, using different variables. But such an implementation would be "weak" due to its boolean nature.

The processing which my system uses does a few additional things that the preceding code does not do. It has a logical test to determine the orientation of the SVG axes, after all the user is free to make the x,y origin other than the upper left corner. That has repercussions on how to compare the two variables in the programming code. Additionally my system uses a fuzzy set calculation which provides a continuous value, rather than a boolean value as a response.

The calculation used for AtRight is shown in figure equation 1. The response curve which this calculation produces is shown in figure 2. Succinctly, it can be said the function, g(x), which implements AtRight processing inputs a scalar value x and returns a "real value". The value used for the x is, X2 - X1, the x coordinate of the origins of the two objects under comparison.

One can see that in addition to being simply an assertion, predicates like AtRight in my RDF predicates above can be used as locators of the facts they describe.

Lets look at an example of using RDF predicates like those above in the role of locators. We have just seen that AtRight compares the x values of two object's origins. Looking at the SVG code above for the program barchart we see

<rdf:Description about="#text1">
     <daxsvg:Below resource="#xbaseline"/>
 
 <rect id="xbaseline" x="37" y="200" width="329" height="1" style="stroke:blue; stroke-width:1" />
 
 <text id="text1" x="37" y="210"
    style="font-family:Verdana; font-size:12.333; fill:black">
 87  88  89  90  91  92  93  94  95  96  97  98  99
</text>

The daxsvg predicate Below employs a calculation like

public boolean Below( int x1, int x2 )
        {
            if (x1 > x2 )
            {
                return true;
            }
            else
            {
                return false;
            }
        }

which in the case of this SVG picture (file) would return TRUE, as the test for the value of this predicate, according to the x coordinate values of text1 and xbaseline.

In a similar fashion each of the daxsvg predicates in the SVG program barchart could be verified as TRUE.

Here we see that there is a viable mechanism for representing a SIGNATURE detector. A signature is a collection of facts about a visual which can be used to verify whether or not the object described by the signature is present.

A concrete example of this is the signature for a barchart picture. One stipulates that a barchart has several parallel lines or rectangles, that there is often text below the parallel lines. There may be parallel lines (or rectangles) on each end of the set of parallel lines or bars. There is always a y axis and an x axis. The bars of the barchart are the parallel lines or rectangles and usually they are somewhat close together. The text below the longitudinal axis of the bars is likely the x axis details and the text to the left or right of the bars at one end or the other is likely the y axis details. There may be text below the x axis text.

This may seem a little verbose but remember you didnt have to write a computer program to do this all you had to do was type a few english sentences as description of the signature. A program translates the english into RDF which is organized by being embedded in an XGMML graph. The graph structure is used to control the focus of activation of the various individual RDF locators. The graph can implement AND and Or etc.

If you wish to see code which does this send me an email.

SVG pictures are "parsed" for content using RDF facts, and fuzzy set parameterization.

Fuzzy Sets are a branch of mathematics pioneered by Lotfi Zadeh at Berkeley University California. Many papers have been written about the mathematical details as to how fuzzy sets are computed and applied to various representational problems, by Zadeh, Mamdani, Sugeno and others. This author had a paper on fuzzy set application recommended for publication in an international technical journal. The paper was how to use fuzzy sets to describe spatial constructs using situatedness. In this paper we see using fuzzy sets for adding non-binary spatial and temporal constructs to SVG descriptions, permitting continuous accessibility.

Continuous accessibility means that relationships and objects can be other than completely true or completely false, for example distance of separation is relevant, as is size and angle of layout. Since fuzzy sets handle a continuum it isnot difficult to develop a context whereby values for SVG translations and animations may be mapped to linguistic variables such as near, far, middle, fast, not too slow, etc. I have published a number of papers on how such calculations may be performed.

Fuzzy Sets are a bone fide way of consistantly handling problems caused by First Order Predicate Logic's "Law of the Excluded Middle" (whereby the values can only be either 0 or 1 and nothing exists in between.) Of course the real world is continuous not binary. This paper shows use RDF(S) representation of spatiality and SVG object relationship and how application of Zadeh's fuzzy set mathematics overcomes RDF's everything is "black or white".

An SVG diagram, a "business chart" is presented and the code is shown / explained which adds metadata to these visuals and also the practical use of fuzzy sets, which is the parameterization of RDF's predicates, and to provide a continuous measure rather than RDF's binary one. XGMML is shown as a network representation of 'significant' visual information, which is searchable and castable to RDF or other metadata representations. The text file xscenegraph is an example of representation of the barchart SVG file into an XGMML file.

The methodology for serializing ascription of SVG visual content (ie making natural language text from the picture itself) is shown (including 'non-linear' contexts). Description and code for this is shown in text file serascrip.

Creating some fuzzy sets and displaying them with SVG is shown and explained. These are found in the file named fuzzysetdemo. The SVG display allows for immediate understanding of how fuzzy sets augment the accessability of SVG visual content. Fuzzy set information can also be serialized and output as text or text-to-speech voice.

We see the creating of XGMML XML structures from SVG files, for example xscenegraph. The paper also presents creating XGMML XML structures from RDF, see the file rdfxgmml.

XHTML rendition created by gcapaper Web Publisher v2.0, © 2001-3 Schema Software Inc.