Using the navigation page for org.apache.forrest.plugin.input.Daisy

View: New views
14 Messages — Rating Filter:   Alert me  

Using the navigation page for org.apache.forrest.plugin.input.Daisy

by Michael Toback :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Some parts of this message have been removed. Learn more about Nabble's security policy.

Hi,

 

I am trying to use the Daisy plugin to publish content from a Daisy site via Forrest.

 

I started by creating a dummy project

 

Per the instructions on the location map, I added the following match to the sitemap.xmap file associated with my project:

 

      <map:match pattern="locationmap-project.xml">

        <map:generate src="http://localhost:9263/publisher/blob?documentId=1-DSY&amp;version=live&amp;partType=10"/>

        <map:transform src="{forrest:plugins}/org.apache.forrest.plugin.input.Daisy/resources/stylesheets/navigation-to-locationmap.xsl">

          <map:parameter name="publisherURL" value="http://localhost:9263/publisher/"/>

          <map:parameter name="pathPrefix" value="/"/>

        </map:transform>

        <map:serialize type="xml"/>

      </map:match>

 

This differs from the instructions in two ways. First, I do not embed the username/password, that syntax seemed to fail. Second the partType for navigation is 10, not the 1 given in the example.

 

 

 

The navigation document is 2-DSY, so I created a site.xml containing the following:

 

<site label="MyProj" href="" xmlns="http://apache.org/forrest/linkmap/1.0" xmlns:xi="http://www.w3.org/2001/XInclude" tab="">

            <xi:include href="cocoon://2.daisy.navigation"/>

</site>

 

When I run “forrest site” I get the following broken link:

 

  <link message="Resource not found: cocoon://1.daisy.navigation" uri="linkmap.html">

  </link>

 

I assume I’m setting something up incorrectly?

 

Michael

The information transmitted herewith is sensitive information of Chordiant Software or its customers and is intended only for use to the individual or entity to which it is addressed. If the reader of this message is not the intended recipient, you are hereby notified that any review, retransmission, dissemination, distribution, copying or other use of, or taking of any action in reliance upon, this information is strictly prohibited. If you have received this communication in error, please contact the sender and delete the material from your computer.

Re: Using the navigation page for org.apache.forrest.plugin.input.Daisy

by rgardler :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Michael Toback wrote:
> I am trying to use the Daisy plugin to publish content from a Daisy site
> via Forrest.


It looks to me like you are using the latest SVN head version of Forrest
but using the docs from the website (which represent the latest
published version of the plugin.

The docs ones bundled with the source are up to date (I think).

cd FORREST_HOME
cd whiteboard/plugins/org.apache.forrest.plugin.input.Daisy
forrest run
http://localhost:8888

If you still hit problems let us know. In fact, if it works well for you
let us know and we'll release a 0.9-dev snapshot version of the plugin
and thus update the online docs.

Ross

<a name="xxx"> being added for @id

by Dr. Bhatia Praveen :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hello,
  I need your expert advice on the following.
  I use javaScript code via <script>....</script> inside xml file which
would be rendered into html later.

  I use a <input id="xxx"> element too.
  I noticed that document-to-html.xsl recognizes @id and adds <a
name="xxx"/> before the input element, because of which the
document.getElementById("xxx") ends up getting the wrong element.
  To overcome the problem I commented out the <a name="xxx"> generation in
document-to-html.xsl, which made the code work !
  What are :
1) The consequences of this change to what forrest normally expects or does?
2) What could be a better workaround than the hack that I did?

Praveen


RE: Using the navigation page for org.apache.forrest.plugin.input.Daisy

by Michael Toback :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

When I install forrest 0.8 on a separate machine and download the 0.8
version of the plugin (from the forrest.apache.org/plugins/ site) I get
the following error on running http://localhost:8888/

Could not find component for role:
[org.apache.cocoon.components.modules.input.InputModule/project]
(Key='org.apache.cocoon.components.modules.input.InputModule/projec
t')

Get the same error when installing the SVN plugin and run "Forrest run"

-----Original Message-----
From: Ross Gardler [mailto:rgardler@...]
Sent: Tuesday, June 24, 2008 4:06 AM
To: user@...
Subject: Re: Using the navigation page for
org.apache.forrest.plugin.input.Daisy

Michael Toback wrote:
> I am trying to use the Daisy plugin to publish content from a Daisy
site
> via Forrest.


It looks to me like you are using the latest SVN head version of Forrest

but using the docs from the website (which represent the latest
published version of the plugin.

The docs ones bundled with the source are up to date (I think).

cd FORREST_HOME
cd whiteboard/plugins/org.apache.forrest.plugin.input.Daisy
forrest run
http://localhost:8888

If you still hit problems let us know. In fact, if it works well for you

let us know and we'll release a 0.9-dev snapshot version of the plugin
and thus update the online docs.

Ross
The information transmitted herewith is sensitive      information of Chordiant Software or its customers and is intended only for use to the individual or entity to which it is addressed. If the reader of this message is not the intended recipient, you are hereby notified that any review, retransmission, dissemination, distribution, copying or other use of, or taking of any action in reliance upon, this information is strictly prohibited. If you have received this communication in error, please contact the sender and delete the material from your computer.

Re: <a name="xxx"> being added for @id

by rgardler :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Dr. Bhatia Praveen wrote:
> Hello,
>   I need your expert advice on the following.
>   I use javaScript code via <script>....</script> inside xml file which
> would be rendered into html later.
>
>   I use a <input id="xxx"> element too.
>   I noticed that document-to-html.xsl recognizes @id and adds <a
> name="xxx"/> before the input element, because of which the
> document.getElementById("xxx") ends up getting the wrong element.

eh?
getElementById does what it says. It gets the element with a given id.
It shouldn't (can't?) return the anchor element with the name attribute.
Are you sure you diagnosed tho real problem?

>   To overcome the problem I commented out the <a name="xxx"> generation in
> document-to-html.xsl, which made the code work !
>   What are :
> 1) The consequences of this change to what forrest normally expects or does?

The most immediate side effect will be that table of contents and other
cross referencing will not work.

> 2) What could be a better workaround than the hack that I did?

Lets see if this really in the problem.

Ross

RE: <a name="xxx"> being added for @id

by Dr. Bhatia Praveen :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi,
   Intuitively I also felt strange that <a name="xxx"> and < input id="xxx">
should get entangled this way. In the <input > element I did not give any
name attribute but when in the JavaScript I did:
 alert(document.getElementById("xxx").name) it gave "xxx" !

 When I comment out the <a name=""> generation in the document-to-html.xsl
alert  gives "undefined" and <input id="xxx" > responds correctly to any
changes made to its value by JavaScript.
 
 I use internet explorer Version 6.0 (Japanese version). Could it be due the
browser?

Praveen

-----Original Message-----
From: Ross Gardler [mailto:rgardler@...]
Sent: Wednesday, June 25, 2008 6:07 AM
To: user@...
Subject: Re: <a name="xxx"> being added for @id

Dr. Bhatia Praveen wrote:
> Hello,
>   I need your expert advice on the following.
>   I use javaScript code via <script>....</script> inside xml file which
> would be rendered into html later.
>
>   I use a <input id="xxx"> element too.
>   I noticed that document-to-html.xsl recognizes @id and adds <a
> name="xxx"/> before the input element, because of which the
> document.getElementById("xxx") ends up getting the wrong element.

eh?
getElementById does what it says. It gets the element with a given id.
It shouldn't (can't?) return the anchor element with the name attribute.
Are you sure you diagnosed tho real problem?

>   To overcome the problem I commented out the <a name="xxx"> generation in
> document-to-html.xsl, which made the code work !
>   What are :
> 1) The consequences of this change to what forrest normally expects or
does?

The most immediate side effect will be that table of contents and other
cross referencing will not work.

> 2) What could be a better workaround than the hack that I did?

Lets see if this really in the problem.

Ross


RE: Using the navigation page for org.apache.forrest.plugin.input.Daisy

by Michael Toback :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi Ross,

Thanks for your help.

Maybe I should start from the beginning?

We want to be able to take content from a Daisy repository and publish
it through Forrest.

1. How do I set up the http request? By looking in the index.xml in the
plugin documentation, I think it would be this:

<map:match pattern="locationmap-project.xml">
  <map:generate
src="http://user:password@localhost:9263/publisher/blob?documentId=NAVIG
ATION-DOCUMENT-ID&version=live&partType=1"/>
  <map:transform
src="{forrest:plugins}/org.apache.forrest.plugin.input.Daisy/resources/s
tylesheets/navigation-to-locationmap.xsl">
    <map:parameter name="publisherURL"
value="http://username:password@localhost:9263/publisher/"/>
    <map:parameter name="pathPrefix" value="/"/>
  </map:transform>
  <map:serialize type="xml"/>
</map:match>

Do I have to change NAVIGATION-DOCUMENT-ID to the navigation document
number? Or is it number + namespace??

2. If I'm not using content other than daisy, do I need a site xml file?

3. Where do I run forrest from for a daisy site?? I was guessing
<DaisyRoot>\WikiData\sites\<site_name>

4. Do I need to seed a daisy site? Or do I need to change some
properties file so it knows to use the daisy plugin?
The information transmitted herewith is sensitive      information of Chordiant Software or its customers and is intended only for use to the individual or entity to which it is addressed. If the reader of this message is not the intended recipient, you are hereby notified that any review, retransmission, dissemination, distribution, copying or other use of, or taking of any action in reliance upon, this information is strictly prohibited. If you have received this communication in error, please contact the sender and delete the material from your computer.

Re: Using the navigation page for org.apache.forrest.plugin.input.Daisy

by David Crossley :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Michael Toback wrote:

>
> Maybe I should start from the beginning?
>
> We want to be able to take content from a Daisy repository and publish
> it through Forrest.
>
> 1. How do I set up the http request? By looking in the index.xml in the
> plugin documentation, I think it would be this:
>
> <map:match pattern="locationmap-project.xml">
>   <map:generate
> src="http://user:password@localhost:9263/publisher/blob?documentId=NAVIG
> ATION-DOCUMENT-ID&version=live&partType=1"/>
>   <map:transform
> src="{forrest:plugins}/org.apache.forrest.plugin.input.Daisy/resources/s
> tylesheets/navigation-to-locationmap.xsl">
>     <map:parameter name="publisherURL"
> value="http://username:password@localhost:9263/publisher/"/>
>     <map:parameter name="pathPrefix" value="/"/>
>   </map:transform>
>   <map:serialize type="xml"/>
> </map:match>
>
> Do I have to change NAVIGATION-DOCUMENT-ID to the navigation document
> number? Or is it number + namespace??
>
> 2. If I'm not using content other than daisy, do I need a site xml file?
>
> 3. Where do I run forrest from for a daisy site?? I was guessing
> <DaisyRoot>\WikiData\sites\<site_name>
>
> 4. Do I need to seed a daisy site? Or do I need to change some
> properties file so it knows to use the daisy plugin?

It sounds like you have not understood the basics of Forrest.
In a new directory, somewhere away from the Forrest sources,
type:
 forrest seed-basic
This gives you a very minimal seed site with all the
configuration files.
 forrest run
Have a look around, tweak things, see the effect.

In your forrest.properties file, add "Daisy" as another
required plugin. Now you can start to build up your
Daisy-based Forrest project.

Get ideas from Forrest's Daisy Plugin website, as Ross suggested.
This is a simple Forrest project site that demonstrates the
capabilities. See its configuration files, especially the
forrest.properties* files and the locationmap.xmap files.
If you are using the current SVN trunk of Forrest (0.9-dev)
then 'cd $FORREST_HOME/whiteboard/plugins/org.apache.forrest.plugin.input.Daisy'.
You can do 'forrest run' there to see the demo in action.
You would need to change the port number for your own
Forrest project to be able to run the both at once.
Search the FAQ for "jetty.port".

Get other ideas from Apache Cocoon's use of Forrest/Daisy
for their v2.1 docs.
http://svn.apache.org/repos/asf/cocoon/whiteboard/daisy-to-docs
See escpecially the forrest.properties* files and the
src/documentation/locationmap-daisy-include.xml file.

Daisy is in the "whiteboard", so we really should be discussing
it on the Forrest "dev" mailing list.

By the way, please do not append disclaimers to your email footers.
They have no bearing in a public forum.

-David

Re: Using the navigation page for org.apache.forrest.plugin.input.Daisy

by rgardler :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Michael Toback wrote:
> When I install forrest 0.8 on a separate machine and download the 0.8
> version of the plugin (from the forrest.apache.org/plugins/ site) I get
> the following error on running http://localhost:8888/
>
> Could not find component for role:
> [org.apache.cocoon.components.modules.input.InputModule/project]
> (Key='org.apache.cocoon.components.modules.input.InputModule/projec
> t')

That's not an error, it's a warning (see the start of the line). You can
ignore this.

I see you have provided more detail elsewhere. I'll reply later in the
thread (unless David has covered everything).

Ross

> Get the same error when installing the SVN plugin and run "Forrest run"
>
> -----Original Message-----
> From: Ross Gardler [mailto:rgardler@...]
> Sent: Tuesday, June 24, 2008 4:06 AM
> To: user@...
> Subject: Re: Using the navigation page for
> org.apache.forrest.plugin.input.Daisy
>
> Michael Toback wrote:
>> I am trying to use the Daisy plugin to publish content from a Daisy
> site
>> via Forrest.
>
>
> It looks to me like you are using the latest SVN head version of Forrest
>
> but using the docs from the website (which represent the latest
> published version of the plugin.
>
> The docs ones bundled with the source are up to date (I think).
>
> cd FORREST_HOME
> cd whiteboard/plugins/org.apache.forrest.plugin.input.Daisy
> forrest run
> http://localhost:8888
>
> If you still hit problems let us know. In fact, if it works well for you
>
> let us know and we'll release a 0.9-dev snapshot version of the plugin
> and thus update the online docs.
>
> Ross
> The information transmitted herewith is sensitive      information of Chordiant Software or its customers and is intended only for use to the individual or entity to which it is addressed. If the reader of this message is not the intended recipient, you are hereby notified that any review, retransmission, dissemination, distribution, copying or other use of, or taking of any action in reliance upon, this information is strictly prohibited. If you have received this communication in error, please contact the sender and delete the material from your computer.


Re: <a name="xxx"> being added for @id

by rgardler :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

[Please use inline responses, it makes the archives more readable]

Dr. Bhatia Praveen wrote:
> Hi,
>    Intuitively I also felt strange that <a name="xxx"> and < input id="xxx">
> should get entangled this way. In the <input > element I did not give any
> name attribute but when in the JavaScript I did:
>  alert(document.getElementById("xxx").name) it gave "xxx" !

Can you please post a snippet of the HTML and javascript that is
displaying this behaviour.

>  When I comment out the <a name=""> generation in the document-to-html.xsl
> alert  gives "undefined" and <input id="xxx" > responds correctly to any
> changes made to its value by JavaScript.

Likewise, please provide the same snippets that display this behaviour.

>  I use internet explorer Version 6.0 (Japanese version). Could it be due the
> browser?

I doubt it. Lets try some experimentation.

Ross

>
> Praveen
>
> -----Original Message-----
> From: Ross Gardler [mailto:rgardler@...]
> Sent: Wednesday, June 25, 2008 6:07 AM
> To: user@...
> Subject: Re: <a name="xxx"> being added for @id
>
> Dr. Bhatia Praveen wrote:
>> Hello,
>>   I need your expert advice on the following.
>>   I use javaScript code via <script>....</script> inside xml file which
>> would be rendered into html later.
>>
>>   I use a <input id="xxx"> element too.
>>   I noticed that document-to-html.xsl recognizes @id and adds <a
>> name="xxx"/> before the input element, because of which the
>> document.getElementById("xxx") ends up getting the wrong element.
>
> eh?
> getElementById does what it says. It gets the element with a given id.
> It shouldn't (can't?) return the anchor element with the name attribute.
> Are you sure you diagnosed tho real problem?
>
>>   To overcome the problem I commented out the <a name="xxx"> generation in
>> document-to-html.xsl, which made the code work !
>>   What are :
>> 1) The consequences of this change to what forrest normally expects or
> does?
>
> The most immediate side effect will be that table of contents and other
> cross referencing will not work.
>
>> 2) What could be a better workaround than the hack that I did?
>
> Lets see if this really in the problem.
>
> Ross
>


Parent Message unknown Re: Using the navigation page for org.apache.forrest.plugin.input.Daisy

by michael toback-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

David,
 
I have no control over what my company does with their e-mail after I hit the submit button, but to make you happy I created this account :-)
 
I have been successful at following the directions and starting a new project including the Daisy plugin. It appears to be working, but not displaying any documents in the process. I have identified the following issues:
 
1. What I have observed is that the http://svn.apache.org/repos/asf/cocoon/whiteboard/daisy-to-docs does not return any documents either, or I just can't figure out what URL to hit.
 
2. Hitting http://localhost (I set jetty port to 80, thank you for that) gets me http://localhost/index.html which then fails because the project HAS no index.xml or html
 
3. This same project references a variable called daisy.index.docID. My Daisy expert knows what a navigation page is, but has no clue what an index page is.
 
Michael
 
 

Re: Using the navigation page for org.apache.forrest.plugin.input.Daisy

by rgardler :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

michael toback wrote:

>  
> I have been successful at following the directions and starting a new
> project including the Daisy plugin. It appears to be working, but not
> displaying any documents in the process. I have identified the following
> issues:
>  
> 1. What I have observed is that the
> _http://svn.apache.org/repos/asf/cocoon/whiteboard/daisy-to-docs_ does
> not return any documents either, or I just can't figure out what URL to
> hit.

http://svn.apache.org/repos/asf/cocoon/whiteboard/daisy-to-docs/ works
put fine for me.

>  
> 2. Hitting http://localhost <http://localhost/> (I set jetty port to 80,
> thank you for that) gets me http://localhost/index.html which then fails
> because the project HAS no index.xml or html

If you seeded using 'forrest seed' or another seed command then you do
have an index.xml file. Of course if you've been setting up the Daisy
plugin then it may be looking in daisy for it. It is hard to debug
without dainty on this issue.

Can you please confirm you can run Forrest when it is reading local
files, then try and get it working using the Dairy plugin -documenting
each change you make.

Also please confirm the version of Forrest you are using.

> 3. This same project references a variable called daisy.index.docID. My
> Daisy expert knows what a navigation page is, but has no clue what an
> index page is.

It's the Daisy ID of the document that is to act as the index document,
i.e. http://localhost/index.html

Ross

Japanese string: Difference between static pages and servlet pages

by Dr. Bhatia Praveen :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi,
   I wrote a Japanese string in index.xml and processed it to .html files in
the servlet mode ("Forrest run" seen under localhost). The string is showing
fine.
   However, when I convert it into static site (Forrest site), the string is
corrupted and also gives an error "that it is not ending with quote" (In the
corrupted string viewed by Open Source of IE, the end quote is also seems to
be lost).

  What is the difference between the processing of the index.xml page, under
Forrest run  & Forrest site, which could cause this problem? .. and how can
I overcome it?

Regards
Praveen


Re: Japanese string: Difference between static pages and servlet pages

by Thorsten Scherler-3 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Tue, 2008-07-01 at 13:23 +0900, Dr. Bhatia Praveen wrote:
> Hi,
>    I wrote a Japanese string in index.xml and processed it to .html files in
> the servlet mode ("Forrest run" seen under localhost). The string is showing
> fine.
>    However, when I convert it into static site (Forrest site), the string is
> corrupted and also gives an error "that it is not ending with quote"

This error seems to be related with an entity. Not sure about japanese
but I reckon you need send us some more information.

1) We need the source code of the string when requested in servlet
mode.
2) we need the string in the xml file.


In general my guess is encoding problems.

salu2

> (In the
> corrupted string viewed by Open Source of IE, the end quote is also seems to
> be lost).
>
>   What is the difference between the processing of the index.xml page, under
> Forrest run  & Forrest site, which could cause this problem? .. and how can
> I overcome it?
>
> Regards
> Praveen
>
--
Thorsten Scherler                                 thorsten.at.apache.org
Open Source Java                      consulting, training and solutions

LightInTheBox - Buy quality products at wholesale price