| Volet | ||
|---|---|---|
| ||
Esup Lecture Portlet - Configuration Guide
|
| Sommaire | ||||||
|---|---|---|---|---|---|---|
|
Configuration
...
Technical configuration
Adapt to your environment these configuration files:
...
| Bloc de code |
|---|
<visibility>
<allowed/>
<autoSubscribed/>
<obliged>
<group name="local.0"/>
<group .../>
...
<regular attribute="sn" value="user" />
<regular .../>
...
<regex </obliged>
</visibility>
attribute="isMemberOf" pattern="[ a-zA-Z0-9:]*:Eleves" />
<regex .../>
...
</obliged>
</visibility>
|
In this element, In this element, you define 3 groups of visibility;
...
- group : user is in the portal group referenced by attribute name, in the example : user in in group "local.0" - see "portlet.xml" section.
- regular : user check regular, in the example : user in in group "local.0" : user value of portal attribute "sn" is "user" - see "portlet.xml" section.regular
- regex : user check a java regular expression from a portal user attribute, in the example : user value of portal attribute "sn" is "userthe example user value of portal attribute "isMemberOf" is matching the pattern corresponding of all members of a group when the name contains these characters "[ a-zA-Z0-9:]" 0 or n times and when the name finish by ":Eleves" - see "portlet.xml" section.
...
A source is composed of a list of items that will be parsed to be all displayed on interface in web page. A mapping is used to define a xsltFile and itemXPath to apply on a sourceitems selected by itemXPath. Sometimes, to define itemXPath, namespaces definition are required.
...
| Bloc de code |
|---|
<mapping sourceURL="http://info.cri.univ-rennes1.fr/rss/rss.php" xsltFile="http://partages.univ-rennes1.fr/files/partages/Services/CRI/SI/conf_lecture_gwe_ray/stylesheet01.xsl" itemXPath="/rdf:RDF/default:item"> <XPathNameSpace prefix="rdf" uri="http://www.w3.org/1999/02/22-rdf-syntax-ns#"/> <XPathNameSpace prefix="default" uri="http://purl.org/rss/1.0/" /> </mapping> |
...
Explanations:
- xsltFile : url of the xslt file used to parse an item
- mobileXsltFile : url of the xslt file used to parse an item in mobile mode - optionnal. If not present xsltFile is also used in mobile mode.
- itemXPath : xpath expression to locate an item in the xml stream source
- element XPathNameSpace : used by itemXPath definition - optionnal
- In order to define which mapping is applied to a particular source some attributes are used (by priority order):
- sourceURL : url
- of the source, key entry of this mapping
- (example: sourceURL="http://info.cri.univ-rennes1.fr/rss/rss.php")
- dtd : dtd of the source
- xmlType : xmlType of the source
- xmlns : xml namespace of the source
- rootElement : rootElement of the source
Priority to find xslt informations on key entry of a mapping are : sourceURL, DTD, xmlType, xmlns and finally rootElement.
...

