Re: [xsl] hyperlink

Subject: Re: [xsl] hyperlink
From: Jeni Tennison <mail@xxxxxxxxxxxxxxxx>
Date: Fri, 20 Jul 2001 10:35:32 +0100
Hi Paul,

> Unfortunately, I was not able to get it to work using
> 'concat('proj', count(preceding-sibling::project))' either.
> Although, this in no way implies that it isn't the solution, as I
> have only been at this xml/xsl stuff for about a month. Does the
> generate-id() function need to be defined in the schema?

The generate-id() function is part of XSLT, so you don't need to
declare it in the schema.

Your main problem seems to be that while you've successfully created
the table with the links in it, the descriptions for the project don't
appear anywhere within the page. If you have a look at the HTML that's
generated from the transformation, you'll see that no anchors appear
on the page, so it's not surprising that the links don't work. You
have a template that matches p:project to give the description of the
project, but that template is never applied - you never apply
templates to the p:project elements.

To create the project descriptions, with anchors, further down the
page, you need to apply templates to the project elements using:

  <xsl:apply-templates select="p:current_projects/p:project" />

I suggest that you do this after the table. You probably won't see
anything happen when you click on one of the links in the table
because the there's no space within the page below the descriptions,
so they can't be moved up to the top. If you add a load of <br />
elements underneath the xsl:apply-templates then you'll see the
jumping behaviour you'd expect when you click on the links, i.e.:

<xsl:template match="/">
      <table width="100%" cellspacing="0">
      <xsl:apply-templates select="p:current_projects/p:project" />
      <br />
      <br />

Hopefully once you see that working then you can concentrate on
getting it to display in the way you want it to display.



Jeni Tennison

 XSL-List info and archive:

Current Thread