[daisy] BUG(s)? two different links to edit navigation document
A Rocha Webmaster
webmaster at arocha.org
Tue Jun 24 19:57:38 CEST 2008
Ter, 2008-06-24 às 09:58 +0200, Karel Vervaeke escreveu:
> it should be possible to make the navigation tree
> match the language of the active document using publisher requests:
>
> http://cocoondev.org/daisydocs-2_2/373-cd/194-cd/424-cd.html
>
> (I have never done or tried this approach, let us know about your
> experience if you end up doing things like this).
So this is what I am thinking of doing, please advise if it looks all
right or whether I am overlooking something. I need some confidence
boost, as I am still a Daisy newbie!
1. add this to daisywikidata/sites/siteconf.xml:
<publisherRequestSet>matchlang</publisherRequestSet>
2. create daisydata/pubreqs/matchlang/mapping.xml:
<?xml version="1.0"?>
<m:publisherMapping
xmlns:m="http://outerx.org/daisy/1.0#publishermapping">
<m:when test="InCollection('test')" use="matchlang.xml"/>
<m:when test="not InCollection('test')"
use="documentpage_pubreq.xml"/>
</m:publisherMapping>
(because I have a 'test' collection for things like these; if it works
then 2nd clause is removed and 1st clause changed to when test="true")
3. copy
daisy-2.1/daisywiki/webapp/daisy/resources/xml/documentpage_pubreq.xml
to daisydata/pubreqs/matchlang/documentpage_pubreq.xml
4. copy same file to daisydata/pubreqs/matchlang/matchlang.xml and then
change the TWO occurrences of
<p:navigationDocument
id="${pageContext.siteConf.navigationDocId}"
branch="${pageContext.siteConf.branchId}"
language="${pageContext.siteConf.languageId}"/>
in that file to
<p:navigationDocument
id="${pageContext.siteConf.navigationDocId}"
branch="${pageContext.siteConf.branchId}"
language="${language}"/>
because ${language} is the document's language. But this last part is
black magic -- I don't know if I have to change both occurrences of
<p:navigationDocument>. Paths to the occurrence are:
p:publisherRequest/p:document/p:preparedDocuments/p:navigationDocument
and
p:publisherRequest/jx:if test="${pageContext.layoutType ==
'default'}"/p:navigationTree/p:navigationDocument
-- do I need to change both? Is the above process correct? Help!
Júlio.
More information about the daisy
mailing list