...
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 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.
...