Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Forrest: User

Use of anchors with site: links

 

 

Forrest user RSS feed   Index | Next | Previous | View Threaded


hlship at comcast

May 26, 2004, 4:43 AM

Post #1 of 4 (438 views)
Permalink
Use of anchors with site: links

I've attempted to create links of the form:

<link href="site:rules#Translators">translator</link>

But got the error

[java] X [0] descriptor.html BROKEN: Invalid XPath:
'/site//rules#Translators/@href'. Invalid symbol '#' after: '/site//rules'

I feel this is a bug in Forrest ... it should allow and honor the anchor reference, or provide
another attribute on the <link> element for this purpose. Am I missing something?

--
Howard M. Lewis Ship
Independent J2EE / Open-Source Java Consultant
Creator, Jakarta Tapestry
Creator, Jakarta HiveMind
http://howardlewisship.com


crossley at apache

May 26, 2004, 5:17 AM

Post #2 of 4 (415 views)
Permalink
Re: Use of anchors with site: links [In reply to]

Howard M. Lewis Ship wrote:
> I've attempted to create links of the form:
>
> <link href="site:rules#Translators">translator</link>
>
> But got the error
>
> [java] X [0] descriptor.html BROKEN: Invalid XPath:
> '/site//rules#Translators/@href'. Invalid symbol '#' after: '/site//rules'
>
> I feel this is a bug in Forrest ... it should allow and honor the anchor reference, or provide
> another attribute on the <link> element for this purpose. Am I missing something?

It is certainly a needed enhancement. Would you be able to
add it as a Jira issue.

For now the workaround it to define these explicitly in
site.xml and use them as site:rules/Translators

--David


hlship at comcast

May 26, 2004, 6:01 AM

Post #3 of 4 (416 views)
Permalink
RE: Use of anchors with site: links [In reply to]

I'll get it into Jira shortly.

My workaround was to use href="rules.html#Translators", which is fine (my document tree is stable
and relatively flat).

--
Howard M. Lewis Ship
Independent J2EE / Open-Source Java Consultant
Creator, Jakarta Tapestry
Creator, Jakarta HiveMind
http://howardlewisship.com


> -----Original Message-----
> From: David Crossley [mailto:crossley [at] apache]
> Sent: Wednesday, May 26, 2004 9:17 AM
> To: forrest-user [at] xml
> Subject: Re: Use of anchors with site: links
>
>
> Howard M. Lewis Ship wrote:
> > I've attempted to create links of the form:
> >
> > <link href="site:rules#Translators">translator</link>
> >
> > But got the error
> >
> > [java] X [0] descriptor.html
> BROKEN: Invalid XPath:
> > '/site//rules#Translators/@href'. Invalid symbol '#' after:
> '/site//rules'
> >
> > I feel this is a bug in Forrest ... it should allow and
> honor the anchor reference, or provide
> > another attribute on the <link> element for this purpose.
> Am I missing something?
>
> It is certainly a needed enhancement. Would you be able to
> add it as a Jira issue.
>
> For now the workaround it to define these explicitly in
> site.xml and use them as site:rules/Translators
>
> --David
>
>


dave at brondsema

May 27, 2004, 4:47 AM

Post #4 of 4 (416 views)
Permalink
Re: Use of anchors with site: links [In reply to]

On Wed, 26 May 2004, Howard M. Lewis Ship wrote:

> I've attempted to create links of the form:
>
> <link href="site:rules#Translators">translator</link>
>
> But got the error
>
> [java] X [0] descriptor.html BROKEN: Invalid XPath:
> '/site//rules#Translators/@href'. Invalid symbol '#' after: '/site//rules'
>
> I feel this is a bug in Forrest ... it should allow and honor the anchor reference, or provide
> another attribute on the <link> element for this purpose. Am I missing something?
>

While not as elegant, you can still achieve the same effect with this
(taken from forrest's own site.xml):

<site label="Forrest" href=""
xmlns="http://apache.org/forrest/linkmap/1.0" tab="home">

<about label="About">
<index label="Index" href="index.html"/>
<license label="License" href="license.html"/>
<download label="Download"
href="http://www.apache.org/dyn/closer.cgi/xml/forrest/"/>
<who label="Who we are" href="who.html"/>
<faq label="FAQs" href="faq.html">
<docbook href="#docbook"/>
<ignoring_javadocs href="#ignoring_javadocs"/>
<link_raw href="#link_raw"/>
<pdf_images href="#pdf_images"/>
</faq>
</about>
</site>

Then you can do something like:
<link href="site:faq/link_raw">raw files</link>


I think it putting it as another attribute would be a nice feature,
though.

--
Dave Brondsema : dave [at] brondsema
http://www.brondsema.net : personal
http://www.splike.com : programming
http://csx.calvin.edu : student org

Forrest user RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.