This is the mail archive of the xsl-list@mulberrytech.com mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: hyperlink



Hi Jeni,
    Thank you so much for your reply.  I've been stuck for quite  a while.
The suggestion you made seems to be working, but I am having trouble with
the link being displayed.  When I click on a 'project title' in the table,
the url changes, showing that a different xml id is being displayed.
   eg.    http://yadda/yadda/yadda/project.xml#IDARE2GB  or
http://yadda/yadda/yadda/project.xml#IDA3B2GB
So, it appears that the  <a href="#{generate-ed}"> is working fine.  I have
"opened links in a new window" by right clicking the link, and it brings up
the url with a new #ID, but shows only a blank page.
     This Leads me to believe that I am still to blind in the xsl world to
figure out how to display the linked 'description' correctly (even with a
great example at my fingertips).
If there is something simple I may be overlooking, I would greatly
appreciate your help (as I do already).

Thanks much

Paul Grimes

>* a generated ID for the project using generate-id()
>
>     generate-id()
>
>These each have advantages and disadvantages. The first two will stay
>the same every time you perform the transformation, whereas the
>generated ID might change. The project titles may not be unique -
>that's something you have to check in your source - and are fairly
>long. The position of the project takes a long time to calculate.
>
>Taking the last option, you need to create a link that uses this ID
>within the table cell holding the project title:
>
>  <td>
>    <div class="row">
>      <a href="#{generate-id()}">
>        <xsl:value-of select="project_title" />
>      </a>
>    </div>
>  </td>
>
>and create an anchor for the project when you give its description
>further down the page, which probably looks something like:
>
><xsl:template match="project">
>  <h2>
>    <a name="{generate-id()}" id="{generate-id()}">
>      <xsl:value-of select="project_title" />
>    </a>
>  </h2>
>  <xsl:apply-templates select="description" />
></xsl:template>


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]