dynamiclist.dtd
: Elements - Entities - Source | Intro - Index
FRAMES / NO FRAMES
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.
Element's model:
<dynamiclist>'s children Name Cardinality abstract Only one author Only one country At least one display Only one harvestdate Only one itemname Only one language Only one publishdate Only one query Only one site At least one source Only one title Only one topic Any number usertype At least one version Only one
(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.
Element's model:
<query>'s children Name Cardinality filter Only one sort Only one
<query>'s attributes Name Values Default numberitems 1, 2, 3, 4, 5 1 repository backgrounder
@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.
Element's model:
<filter>'s children Name Cardinality parameter Only one
<filter>'s attributes Name Values Default tagName title, topic, harvestdate, usertype type includes, equals
<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 Name Values Default order ascending, descending ascending tagName title, 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.
Element's model:
<display>'s children Name Cardinality map At least one
<display>'s attributes Name Values Default template template1, template2, template3, template4 template1
(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 Name Values Default fun1 Match the NMTOKEN rules. fun2 Match the IDREF rules. holeName a, b, c tagName title, 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.
Element's model:
<beta>'s children Name Cardinality alpha At least one
<gamma> | Root element |
Sorry, no documentation.
Element's model:
<gamma>'s children Name Cardinality beta At least one
<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.
Element's model:
<phi>'s children Name Cardinality beta At least one
(beta, beta, beta, (beta | beta))+
<ksi> | Root element |
Sorry, no documentation.
Element's model:
<ksi>'s children Name Cardinality rho Any number zeta Any number
<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.