[daisy] BUG(s)? two different links to edit navigation document
Karel Vervaeke
karel at outerthought.org
Wed Jun 25 17:45:28 CEST 2008
That's not correct: the documentpage_pubreq.xml file is not a valid
publisher request file on the repository side:
- It is merely a template for generating publisher requests to send to
the repository
- The pageContext variable is only known on the wiki, and it is
resolved before the request is sent to the repository.
I just experimented a bit, it seems the whole publisher request set
approach does not seem to work (Sorry). You could apply your changes
directly to this file
(daisy-2.1/daisywiki/webapp/daisy/resources/xml/documentpage_pubreq.xml),
but it might interfere the Site switching algorithm and other parts of
the Wiki. Perhaps the introduced problems are greater than the amount
of problems solved.
There is another thing you could evaluate/try: if there is a web server
in front of your Daisy installation, you could use rewrite rules (a la
mod_proxy) to make the urls prettier (again, may have some other
consequences)
(e.g. translate (extranal) /en/portugal to (internal) daisy/en_portugal)
HTH,
Karel
On Tue, 2008-06-24 at 18:57 +0100, A Rocha Webmaster wrote:
> 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.
>
> _______________________________________________
> daisy community mailing list
> Professional Daisy support: http://outerthought.org/en/services/daisy/support.html
> mail to: daisy at lists.cocoondev.org
> list information: http://lists.cocoondev.org/mailman/listinfo/daisy
More information about the daisy
mailing list