dynamiclist.dtd: Elements - Entities - Source | Intro - Index
FRAMES / NO FRAMES

Dynamic List Box

The XML defined after this document describes which query to make and how to display its results. The query is defined under the query tag. Here is an example :

        <query repository="%\bbackgrounder" numberitems="3">
            <filter type="includes" tagName="usertype">
                <parameter>guest</parameter>
            </filter>
            <sort order="ascending" tagName="harvestdate"/>
        </query>

One reads it this way :

The query will be made upon the backgrounder repository. Therefore, the query will give some backgrounders as a result. The result set will contain at most 3 backgrounders, sorted upon their harvest date, in a ascending order. The selected backgrounders are those of which the usertype tag includes the gues value.

It is a rather straightforward explanation. Basically, the query works as a filter. All the content items of the given repository for the current site are filtered out according to the "filter" tag. The type of the filter indicates what to check for. Usually filter should always work list is intended for the homepage, this component won't be able to display complex content or big content. It is rather intended to display a few information taken out of each of the items returned by the query. Let's look at an example.

        <display template="template2">
            <map tagName="title" holeName="a"/>
            <map tagName="harvestdate" holeName="b"/>
        </display>

One reads it this way :

Each of the item will be displayed according to the template "template2". Once displayed, the holes in the template will be replaced by values taken from the items returned by the query.

Before rereading the explaination, here are the different standard templates :

...

So as said above, the templates will be used to display each item.



<dynamiclist> Root element

Dynamic list top node.

<dynamiclist>'s children
NameCardinality
abstractOnly one
authorOnly one
countryAt least one
displayOnly one
harvestdateOnly one
itemnameOnly one
languageOnly one
publishdateOnly one
queryOnly one
siteAt least one
sourceOnly one
titleOnly one
topicAny number
usertypeAt least one
versionOnly one
Element's model:

(version, country+, language, author, itemname, site+, topic*, source, usertype+, publishdate, harvestdate, title, abstract, query, display)


<query> Child of dynamiclist

The query part describes how to retrieve the results from the repository to display.

We could have made it closer to the targeter definition but then it'd be too complicated for an end user. However, as functionality will be extended, it'd be nice to keep in mind that getting closer to Dynamo's way of describing queries will make the transformation of this XML into 'real' queries easier.

<query>'s children
NameCardinality
filterOnly one
sortOnly one
<query>'s attributes
NameValuesDefault
numberitems1, 2, 3, 4, 51
repositorybackgrounder
Element's model:

(filter, sort)


@repository Attribute of query

The repository on which to apply the query. It is an attribute so that we get instant validation through DTD. As a naming convention, the repository name is the one of the corresponding RepositoryName property of the repository. So for example for the backgrounders, we'll use the name "BackgroundersRepository" because the repository property defined in /configurations/common/repositories/backgrounders/BackgroundersRepository.properties is such.

This will allow to build a automatic (configuration-less) mapper.

Possible values: backgrounder - Required


@numberitems Attribute of query

The maximum number of items returned by the query to display.

Possible values: 1, 2, 3, 4, 5 - Default value: 1


<filter> Child of query

The filter describes which items to retrieve from the repository. Basically, it states a condition that each item must satisfy to be part of the result set. A filter might need several parameters.

<filter>'s children
NameCardinality
parameterOnly one
<filter>'s attributes
NameValuesDefault
tagNametitle, topic, harvestdate, usertype
typeincludes, equals
Element's model:

(parameter)


<parameter> Child of filter

A parameter to the filter. For example a filter can ask to get elements belonging to a list.


@type Attribute of filter

Sorry, no documentation.

Possible values: includes, equals - Required


@tagName Attribute of filter

Sorry, no documentation.

Possible values: title, topic, harvestdate, usertype - Required


<sort/> Child of query

Tells on which tag to sort the content. Please note that the tag must be reachable by Dynamo as a property. Therefore, its definition must appear in the "itemdescriptors". Please note that it doesn't make sense to sort on multi-valued tags.

The sort information have been put in a separate element to allow for a sort on several tags (we could have given all the tags in a coma separated list but then we would have lost the DTD validation capabilities.

<sort>'s attributes
NameValuesDefault
orderascending, descendingascending
tagNametitle, topic, harvestdate, usertype

This element is always empty.


@order Attribute of sort

Tells in which order to sort.

Possible values: ascending, descending - Default value: ascending


@tagName Attribute of sort

Tells on which item's tag to sort.

Possible values: title, topic, harvestdate, usertype - Required


<display> Child of dynamiclist

The display tag describes how each item will rendered. Right now, the items are assumed to be displayed one below each other.

<display>'s children
NameCardinality
mapAt least one
<display>'s attributes
NameValuesDefault
templatetemplate1, template2, template3, template4template1
Element's model:

(map+)


@template Attribute of display

Selects which template to be used for the display. Several are available.

Possible values: template1, template2, template3, template4 - Default value: template1


<map/> Child of display

Each template has holes to be filled, named a,b,c,... The map tags tell what value to put in each hole.

This tag is only defined by attributes right now.

<map>'s attributes
NameValuesDefault
fun1Match the NMTOKEN rules.
fun2Match the IDREF rules.
holeNamea, b, c
tagNametitle, topic, harvestdate, usertype

This element is always empty.


@tagName Attribute of map

The name of the tag of which the value must be put in a given hole.

Possible values: title, topic, harvestdate, usertype - Required


@holeName Attribute of map

The name of the hole to fill in the template.

Possible values: a, b, c - Required


@fun1 Attribute of map

The name of the hole to fill in the template.

Possible values: Match the NMTOKEN rules. - Required


@fun2 Attribute of map

The name of the hole to fill in the template.

Possible values: Match the IDREF rules. - Required


<alpha> Child of beta

Sorry, no documentation.


<beta> Child of gamma, phi

Sorry, no documentation.

<beta>'s children
NameCardinality
alphaAt least one
Element's model:

(alpha, alpha)+


<gamma> Root element

Sorry, no documentation.

<gamma>'s children
NameCardinality
betaAt least one
Element's model:

(beta, beta)+


<zeta/> Child of ksi

Sorry, no documentation.

This element is always empty.


<rho> Child of ksi

Sorry, no documentation.

This element accepts any declared element as its children.


<phi> Root element

Sorry, no documentation.

<phi>'s children
NameCardinality
betaAt least one
Element's model:

(beta, beta, beta, (beta | beta))+


<ksi> Root element

Sorry, no documentation.

<ksi>'s children
NameCardinality
rhoAny number
zetaAny number
Element's model:

(#PCDATA | zeta | rho)*


<version> Child of dynamiclist

Version of the document.


<country> Child of dynamiclist

Country


<language> Child of dynamiclist

Language code : fr, se, ... to be completed


<author> Child of dynamiclist

Name of the author of the document


<itemname> Child of dynamiclist

Itemname of the document. This must be the same as the name of the file. That is "zero.html" will have an item name that is "zero". Itemname must be unique for a given site. That is, there must be not two content files with the same itemname on a given site.


<site> Child of dynamiclist

sitekey (e.g. www.psychiatry24x7.com) of the sites where this content can appear


<topic> Child of dynamiclist

Describes the topic to which this document is related. The list of topics is clearly defined for a given site. Therefore, this topic is a keyword.


<source> Child of dynamiclist

Source of the document


<usertype> Child of dynamiclist

Kind of users that can see this document. It is a keyword that can have several values :

Note that all of these values are not applicable to a given site.


<publishdate> Child of dynamiclist

Date when the document is published (that is not related to the sCMS publishing process).

Its format is "mm/dd/yyyy", where mm is the month, d is the day of the month and y is the year.


<harvestdate> Child of dynamiclist

Date from which the document can appear on the site. Before that date, the document is kept hidden.

Its format is "mm/dd/yyyy", where mm is the month, d is the day of the month and y is the year.


<keyword> Root element

Some keywords "defining" the document. Used by search engines to build their index.


<title> Child of dynamiclist

Title of this document.


<abstract> Child of dynamiclist

A simple short text describing the document. We don't allow tags (HTML,...) here.