forrest-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Robert Koberg" <...@koberg.com>
Subject extending site.xml -> was -> RE: directory/menu structure
Date Thu, 03 Apr 2003 12:52:42 GMT
Say you want to extend the flexibility of the product.  You want be able to
add some metadata for the application (not for search engines) so you can
get a good deal of customization for your end users. You want your users to
be able to play around with the site's structure and be able to adjust it on
determining appropriate usability requirements (I like to call this
storyboarding :). 

I will make up a new version of the site.xml (note: names need not remain
the same). The things I am including are some of the basic things I have
found to be general from building a *wide* range of static websites. Let's
start simply with a document-root, a folder and a few pages.  I want to keep
this relatively short for a couple of reasons; available time and not to
overwhelm (?). 

Below, I start out each attribute description with an XML Schema datatype.
For more info, check out:
http://www.w3.org/TR/xmlschema-2/
One more thing about datatypes: you can create more useful 'types' by making
your own simpleTypes, for example:
<xs:simpleType name="file.name.length">
  <xs:restriction base="xs:NCName">
    <xs:maxLength value="255"/>
  </xs:restriction>
</xs:simpleType>

I am hoping this post sparks something in you all and the discussion
continues on to things like creating UIs for forrest. This would be a
continuation of the thread yesterday on cocoon-dev, subject being:
 "[RT] Towards a new/another Forms Framework." 
Before that can start, I think we need to get a simple(?) example to work
with.

      ................................................
      
So here are three of the elements I would like to see in the site.xml
     

      --oO  At the docroot level  Oo--
      
          --o  Attributes  o--
          
- @css: an xs:IDREF to set a default CSS for pages that do not need to
override it or add to it. It is constrained by the schema to only be able to
use a reference to one of the css elements.
** @expand: expanded by default (see folder) **
- @id: an xs:ID that is a unique identifier in the site.xml (perhaps
multiple docroots - different site.xml's - could be aggregated...)
- @index_page: an xs:IDREF to tell the app which page to copy to index.html
in the folder. It is constrained by the schema to only use page elements
** @name: paths are always relative so this defaults to '/' (see folder) **
- @onnav: an xs:boolean to tell the app whether to display this item in the
navigation, tabs , snailtrail, paging system, etc...
- @pdf: an xs:boolean to tell the app whether to create a PDF document for
it's contents

          --o  Elements  o--
          
- label: a user-friendly name that would be used for nav, tabs, snailtrail,
etc. They can contain text, EM, or STRONG
- title: use of this element might be determined by an XSL or another
attribute to prepend the HTML/HEAD/TITLE and/or the actual page BODY title
for page children. They can contain text, EM, or STRONG   
- columns: (I am including this for future reference - not in example
site.xml below) columns at the docroot level would cascade their 'content or
'widgets' down through all pages
  -- narrow-col: could contain references to generators, transformers with
xs:IDREF to content pieces or widgets
  -- wide-col: same as above
      
----------------------------------------------------------------------

      --oO  At the folder level  Oo--
      
          --o  Attributes  o--
          
- @css: an xs:IDREF to set a default CSS for pages that do not need to
override it or add to it. It is constrained by the schema to only be able to
use a reference to one of the css elements.
- @expand: an xs:boolean to tell the application to 'expand' this folder's
contents in the nav
- @id: an xs:ID that is a unique identifier in the site.xml
- @index_page: an xs:IDREF to tell the app which page to copy to index.html
in the folder. It is constrained by the schema to only use page elements
- @name: an xs:NCName that is used as an actual file system directory name
{if (!dir.exists() dir.mkdir()}
- @onnav: an xs:boolean to tell the app whether to display this item in the
navigation, tabs , snailtrail, paging system, etc...
- @pager: an xs:boolean to tell the app whether to display a paging system
(<previous 1 [2] 3 next>) for the folder's contents
- @pdf: an xs:boolean to tell the app whether to create a PDF document for
it's contents
- @snailtrail: an xs:boolean to tell the app whether to build a 'breadcrumb'
trail back to the docroot

          --o  Elements  o--
          
- label: a user-friendly name that would be used for nav, tabs, snailtrail,
etc. They can contain text, EM, or STRONG
- title: use of this element might be determined by an XSL or another
attribute to append (the docroot or parent folder) and/or prepend (the page)
the HTML/HEAD/TITLE and/or the actual page BODY title for page children.
They can contain text, EM, or STRONG
- columns: (I am including this for future reference - not in example
site.xml below) columns at the folder level would cascade their 'content or
'widgets' down through all pages
  -- narrow-col: could contain references to generators, transformers with
xs:IDREF to content pieces or widgets
  -- wide-col: same as above

----------------------------------------------------------------------

      --oO  At the page level  Oo--
      
          --o  Attributes  o--
          
- @css: an xs:IDREF to set a default CSS for pages that do not need to
override it or add to it. It is constrained by the schema to only be able to
use a reference to one of the css elements.
- @generate: an xs:boolean to tell the application to create this page
(might not be ready yet, even for a qa stage...)
- @id: an xs:ID that is a unique identifier in the site.xml
- @name: an xs:NCName that is used as an actual filesystem file name. This
could be automatically created from the label
- @onnav: an xs:boolean to tell the app whether to display this item in the
navigation, tabs , snailtrail, paging system, etc...
- @pgstatus: an xs:enumeration to tell the app what stage this page is
living in
- @pdf: an xs:boolean to tell the app whether to create a PDF document for
it's contents
- @pf: an xs:boolean to tell the app whether to create a simple, HTML print
friendly version of the page

          --o  Elements  o--
          
- label: a user-friendly name that would be used for nav, tabs, snailtrail,
etc. They can contain text, EM, or STRONG
- title: use of this element might be determined by an XSL or another
attribute to append (the docroot or parent folder) and/or prepend (the page)
the HTML/HEAD/TITLE and/or the actual page BODY title for page children.
They can contain text, EM, or STRONG
- columns: (I am including this for future reference - not in example
site.xml below) columns at the page level
  -- narrow-col: could contain references to generators, transformers with
xs:IDREF to content pieces or widgets
  -- wide-col: same as above

----------------------------------------------------------------------

      --oO  A sample site.xml  Oo--

<!-- note: I like to keep attributes alphabetical so they display nicely in
XMLSpy -->
<!-- note: boolean attributes set to false don't need to be in the element
-->
<docroot css="default" id="cocoon-2.1" index_page="preamble" onnav="0"
pdf="1">
  <label>Home</label>
  <title>Apache Cocoon</title>
  <page generate="1" id="preamble" name="Preamble.html" onnav="0" pdf="0"
pgstatus="publish" pf="1">
    <label>Preamble</label>
    <title>Preamble</title>
  </page>
  <folder expand="0" id="Article_I" index_page="Article_I_index"
name="Article_I" onnav="1" pager="1" pdf="0" snailtrail="1">
    <label>Powers</label>
    <title>Distribution of Powers</title>
    <page css="index_styles" generate="1" id="Article_I_index"
name="Overview.html" onnav="1" pdf="0" pgstatus="publish" pf="1">
      <label>Overview</label>
      <title>Overview</title>
    </page>
    <page generate="1" id="section_01" name="Section1.html" onnav="1"
pdf="0" pgstatus="publish" pf="1">
      <label>Section 1</label>
      <title><em>Legislative</em> Power Vested</title>
    </page>
  </folder>
  <styling name="css">
    <css id="default" href="default.css"/>
    <css id="index_styles" href="index.css"/>
  <styling>
</docroot>

----------------------------------------------------------------------

Does this do anything for you? (expecting the someone's reply to be 'No' :)

Best,
-Rob


Mime
View raw message