forrest-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Robert Koberg" <...@koberg.com>
Subject site.xml -> was -> RE: [RT] Entities in XML docs
Date Fri, 27 Dec 2002 15:52:03 GMT
Hi Jeff - great work!

Catching up on the recent threads...(hopefully this post is seen as a
contribution?) I have a few questions/comments inline.

> -----Original Message-----
> From: Jeff Turner [mailto:jefft@apache.org]
> Sent: Friday, December 27, 2002 6:48 AM

> :) Think of site.xml as a small database:
>
> PAGE_ID   LABEL        HREF           TIMESTAMP
> -------   -----        ----           ---------
> dreams    Dream list   dreams.html       ...
> faq       FAQs         faq.html
> toc       ToC          doclist.html
> changes   Changes      changes.html
> todo      Todo         todo.html
>
> PAGE_ID is the primary key, and therefore deserves greater syntactic
> importance than all the other attributes.  Seems most natural to make the
> primary key the element name:

I agree that PAGE_ID is used as the primary key but why is it more natural to be
the element name? Why it is better than:

<page id="dreams"/>

To me, this allows for 'grouping' of IDs at the element level. Just trying to
understand.

On book.xml - why is this needed anymore? Cannot the site.xml be used in its
place?

On the metadata front, I have been adopting a mix of Dublin Core and mixing in
the stuff my tool requires. For example, at the bottom is a snippet of what I am
currently using in the site.xml [1]. Below that I have included a schema for the
page level [2] (I have schemas for config, folder and content as well, if
interested). I build a 'properties' form from the schema and if existing,
populate it with the current metadata (very handy). Some resources indicate that
they are just copied while the default would be to transform. I am trying


<snip/>


[1] snippet from new site.xml
...
<lsb:folder name="css" copy="true" />
<lsb:folder name="en-us">
    <lsb:folder_conf>
      <rdf:Description about="folder.dcxml">
        <dc:title>"We the people...."</dc:title>
        <dc:subject>US English version of US Constitution</dc:subject>
        <dc:description>Main site folder</dc:description>
        <dc:coverage>USA</dc:coverage>
        <dc:creator>Robert Koberg</dc:creator>
        <dc:publisher>liveSTORYBOARD</dc:publisher>
        <dc:contributor>Iva Koberg</dc:contributor>
        <dc:rights>Open Source :)</dc:rights>
        <dc:date.created>2002-12-06</dc:date.created>
        <dc:date.modified>2002-12-07</dc:date.modified>
        <dc:format>Folder</dc:format>
        <dc:identifier>en_us</dc:identifier>
        <dc:language>en-us</dc:language>
        <lsb:col name="left" />
        <lsb:col name="wide" />
        <lsb:col name="right" />
        <lsb:css>default</lsb:css>
        <lsb:displ_label>true</lsb:displ_label>
        <lsb:expand>false</lsb:expand>
        <lsb:index_page>preamble</lsb:index_page>
        <lsb:label>Index</lsb:label>
        <lsb:name>en-us</lsb:name>
        <lsb:nav>preamble</lsb:nav>
        <lsb:nav>Article_I</lsb:nav>
        <lsb:nav>Article_II</lsb:nav>
        <lsb:nav>etc...</lsb:nav>
        <lsb:pager>true</lsb:pager>
        <lsb:snailtrail>true</lsb:snailtrail>
        <lsb:type>folder</lsb:type>
        <lsb:xsl>xsl:default</lsb:xsl>
      </rdf:Description>
    </lsb:folder_conf>
    <lsb:page_conf>
      <rdf:Description about="preamble">
        <dc:title>US Constitution Preamble</dc:title>
        <dc:subject>Inaleinable rights</dc:subject>
        <dc:description>The preamble to the US Constitution</dc:description>
        <dc:coverage>USA</dc:coverage>
        <dc:creator>Robert Koberg</dc:creator>
        <dc:publisher>liveSTORYBOARD</dc:publisher>
        <dc:contributor>Iva Koberg</dc:contributor>
        <dc:rights>Open Source :)</dc:rights>
        <dc:date.created>2002-12-06</dc:date.created>
        <dc:date.modified>2002-12-27</dc:date.modified>
        <dc:format>text/html</dc:format>
        <dc:format>text/plain</dc:format>
        <dc:format>application/pdf</dc:format>
        <dc:identifier>preamble</dc:identifier>
        <dc:language>en-us</dc:language>
        <lsb:css>default</lsb:css>
        <lsb:displ_label>true</lsb:displ_label>
        <lsb:generate>true</lsb:generate>
        <lsb:label>Preamble</lsb:label>
        <lsb:metadata>false</lsb:metadata>
        <lsb:print_friendly>true</lsb:print_friendly>
        <lsb:toc>false</lsb:toc>
        <lsb:type>page</lsb:type>
        <lsb:xsl>xsl:default</lsb:xsl>
        <lsb:col name="left" />
        <lsb:col name="wide">
          <dc:source>preamble_content</dc:source>
        </lsb:col>
        <lsb:col name="right" />
      </rdf:Description>
    </lsb:page_conf>
....

[2] Page level RNG schema:

<rng:grammar xmlns:a="http://livestoryboard.com/schemas/annotations/2.0/"
xmlns:rng="http://relaxng.org/ns/structure/1.0"
datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes">
  <rng:start>
    <rng:element name="RDF"
xmlns:rdf="http://www.w3.org/1999/02/220-rdf-syntax-ns#">
      <rng:element name="Description"
xmlns:rdf="http://dublincore.org/resources/faq/">
        <a:h>Metadata</a:h>
        <rng:div a:id="dc">
          <a:h>Dublin Core</a:h>
          <rng:element name="title" xmlns:dc="http://purl.org/dc/elements/1.1/">
            <rng:data type="token">
              <rng:param name="maxLength">100</rng:param>
            </rng:data>
          </rng:element>
          <rng:element name="subject"
xmlns:dc="http://purl.org/dc/elements/1.1/">
            <rng:data type="token">
              <rng:param name="maxLength">256</rng:param>
            </rng:data>
          </rng:element>
          <rng:element name="description"
xmlns:dc="http://purl.org/dc/elements/1.1/">
            <rng:data type="token">
              <rng:param name="maxLength">256</rng:param>
            </rng:data>
          </rng:element>
          <rng:element name="coverage"
xmlns:dc="http://purl.org/dc/elements/1.1/">
            <rng:data type="token">
              <rng:param name="maxLength">100</rng:param>
            </rng:data>
          </rng:element>
          <rng:oneOrMore>
            <rng:element name="creator"
xmlns:dc="http://purl.org/dc/elements/1.1/">
              <rng:data type="token">
                <rng:param name="maxLength">100</rng:param>
              </rng:data>
            </rng:element>
          </rng:oneOrMore>
          <rng:element name="publisher"
xmlns:dc="http://purl.org/dc/elements/1.1/">
            <rng:data type="token">
              <rng:param name="maxLength">100</rng:param>
            </rng:data>
          </rng:element>
          <rng:oneOrMore>
            <rng:element name="contributor"
xmlns:dc="http://purl.org/dc/elements/1.1/">
              <rng:data type="token">
                <rng:param name="maxLength">100</rng:param>
              </rng:data>
            </rng:element>
          </rng:oneOrMore>
          <rng:element name="rights"
xmlns:dc="http://purl.org/dc/elements/1.1/">
            <rng:data type="token">
              <rng:param name="maxLength">100</rng:param>
            </rng:data>
          </rng:element>
          <rng:element name="date.created"
xmlns:dc="http://purl.org/dc/elements/1.1/">
            <rng:data type="token"></rng:data>
          </rng:element>
          <rng:element name="date.modified"
xmlns:dc="http://purl.org/dc/elements/1.1/">
            <rng:data type="token"></rng:data>
          </rng:element>
          <rng:optional>
            <rng:element name="format"
xmlns:dc="http://purl.org/dc/elements/1.1/">
              <rng:value type="token">text/html</rng:value>
            </rng:element>
          </rng:optional>
          <rng:optional>
            <rng:element name="format"
xmlns:dc="http://purl.org/dc/elements/1.1/">
              <rng:value type="token">text/plain</rng:value>
            </rng:element>
          </rng:optional>
          <rng:optional>
            <rng:element name="format"
xmlns:dc="http://purl.org/dc/elements/1.1/">
              <rng:value type="token">application/pdf</rng:value>
            </rng:element>
          </rng:optional>
          <rng:element name="identifier"
xmlns:dc="http://purl.org/dc/elements/1.1/">
            <rng:data type="ID"></rng:data>
          </rng:element>
          <rng:oneOrMore>
            <rng:element name="language"
xmlns:dc="http://purl.org/dc/elements/1.1/">
              <rng:data type="token"></rng:data>
            </rng:element>
          </rng:oneOrMore>
        </rng:div>
        <rng:div a:id="lsb">
          <a:h>liveSTORYBOARD</a:h>
          <rng:optional>
            <rng:element name="col"
xmlns:lsb="http://livestoryboard.com/schemas/config/2.0/">
              <rng:attribute name="name">
                <rng:value type="token">left</rng:value>
              </rng:attribute>
              <rng:oneOrMore>
                <rng:element name="source"
xmlns:dc="http://purl.org/dc/elements/1.1/">
                  <rng:data type="IDREF"></rng:data>
                </rng:element>
              </rng:oneOrMore>
            </rng:element>
          </rng:optional>
          <rng:optional>
            <rng:element name="col"
xmlns:lsb="http://livestoryboard.com/schemas/config/2.0/">
              <rng:attribute name="name">
                <rng:value type="token">wide</rng:value>
              </rng:attribute>
              <rng:oneOrMore>
                <rng:element name="source"
xmlns:dc="http://purl.org/dc/elements/1.1/">
                  <rng:data type="IDREF"></rng:data>
                </rng:element>
              </rng:oneOrMore>
            </rng:element>
          </rng:optional>
          <rng:optional>
            <rng:element name="col"
xmlns:lsb="http://livestoryboard.com/schemas/config/2.0/">
              <rng:attribute name="name">
                <rng:value type="token">right</rng:value>
              </rng:attribute>
              <rng:oneOrMore>
                <rng:element name="source"
xmlns:dc="http://purl.org/dc/elements/1.1/">
                  <rng:data type="IDREF"></rng:data>
                </rng:element>
              </rng:oneOrMore>
            </rng:element>
          </rng:optional>
          <rng:element name="css"
xmlns:lsb="http://livestoryboard.com/schemas/config/2.0/">
            <rng:choice>
              <rng:value type="NMTOKEN">default</rng:value>
              <rng:value type="NMTOKEN">optional</rng:value>
            </rng:choice>
          </rng:element>
          <rng:element name="displ_label"
xmlns:lsb="http://livestoryboard.com/schemas/config/2.0/">
            <rng:data type="boolean"></rng:data>
          </rng:element>
          <rng:element name="generate"
xmlns:lsb="http://livestoryboard.com/schemas/config/2.0/">
            <rng:data type="boolean"></rng:data>
          </rng:element>
          <rng:element name="label"
xmlns:lsb="http://livestoryboard.com/schemas/config/2.0/">
            <rng:data type="token"></rng:data>
          </rng:element>
          <rng:element name="metadata"
xmlns:lsb="http://livestoryboard.com/schemas/config/2.0/">
            <rng:data type="boolean"></rng:data>
          </rng:element>
          <rng:element name="print_friendly"
xmlns:lsb="http://livestoryboard.com/schemas/config/2.0/">
            <rng:data type="boolean"></rng:data>
          </rng:element>
          <rng:element name="toc"
xmlns:lsb="http://livestoryboard.com/schemas/config/2.0/">
            <rng:data type="boolean"></rng:data>
          </rng:element>
          <rng:element name="type"
xmlns:dc="http://livestoryboard.com/schemas/config/2.0/">
            <rng:value type="token">page</rng:value>
          </rng:element>
          <rng:element name="xsl"
xmlns:lsb="http://livestoryboard.com/schemas/config/2.0/">
            <rng:choice>
              <rng:value type="NMTOKEN">xsl:default</rng:value>
              <rng:value type="NMTOKEN">xsl:homepage</rng:value>
              <rng:value type="NMTOKEN">xsl:index</rng:value>
              <rng:value type="NMTOKEN">xsl:sitemap</rng:value>
              <rng:value type="NMTOKEN">xsl:news</rng:value>
              <rng:value type="NMTOKEN">xsl:faqs</rng:value>
              <rng:value type="NMTOKEN">xsl:jobs</rng:value>
              <rng:value type="NMTOKEN">xsl:blog</rng:value>
            </rng:choice>
          </rng:element>
        </rng:div>
      </rng:element>
    </rng:element>
  </rng:start>
</rng:grammar>


>
> --Jeff


Mime
View raw message