RE: unable to reference a portion of my XMLdoucment using HTML hyperlinks

Subject: RE: unable to reference a portion of my XMLdoucment using HTML hyperlinks
From: "Chris Bayes" <Chris@xxxxxxxxxxx>
Date: Thu, 3 Aug 2000 20:58:01 +0100
Raheja,
I got the same problem and the only way I could solve it was to put
something in the anchor like this.
<xsl:template match="activity">
 	<a>
 		<xsl:attribute name="name">
 			<xsl:value-of select="@toc2"/>
 		</xsl:attribute>
some text
 	</a>
It's a bug you have to work round and the work round is probably not what
you want.
Maybe you could extend the </a> past <h4><xsl:value-of select="@type"/></h4>

Ciao Chris

>-----Original Message-----
>From: owner-xsl-list@xxxxxxxxxxxxxxxx
>[mailto:owner-xsl-list@xxxxxxxxxxxxxxxx]On Behalf Of Raheja, Dhruv
>(TRANS)
>Sent: 03 August 2000 19:57
>To: 'XSL-List@xxxxxxxxxxxxxxxxx'
>Subject: unable to reference a portion of my XMLdoucment using HTML
>hyperlinks
>
>
>
>
>> -----Original Message-----
>> From:	Raheja, Dhruv  (TRANS)
>> Sent:	Thursday, August 03, 2000 1:57 PM
>> To:	'XSL-List@xxxxxxxxxxxxxxxxx'
>> Subject:	unable to reference a portion of my XMLdoucment using HTML
>> hyperlinks
>>
>> hello everybody,
>>                        my problem has to do with referencing a portion of
>> my XMLdoucment using HTML hyperlinks. Basically I have a "Table of
>> Contents"  that has hyperlimked titles which when clicked should
>allow the
>> user the access the relevant part of the document. When I view my output,
>> the constituents  of  "Table of Contents" does appear as hyperlinks but
>> when i click on them, nothing happens (i dont even get an error message).
>> the relevant part of the code is as follows:
>>
>>          XML document
>> *******************************
>>
>> 	<toc>
>> 		<title>
>> 			MAIN COMPONENT - GENERAL INFORMATION
>> 		</title>
>> 			<topic toc1="#contactor">
>> 			DC CONTACTOR, 41A296327AM
>> 			</topic>
>> 			<topic toc1="#func_desc">
>> 				FUNCTIONAL DESCRIPTION
>> 			</topic>
>> 			<topic toc1="#clean">
>> 				CLEANING
>> 			</topic>
>> 			 <topic toc1="#lube">
>> 				LUBRICATION
>> 			</topic>
>> 			<topic toc1="#clean">
>> 				INSPECTION
>> 			</topic>
>>             </toc>
>>
>>     In the document, I have also have another attribute (toc2) that is
>> defined in the location that the hyperlink should point to, i.e. for
>> example for  INSPECTION
>>     the text is located in the following element:
>>
>>
>>                         <activity type="INSPECTION"  toc2="inspect">
>>
>>
>>    I am using the values of toc1 and toc2 in the stylesheet as follows:
>>
>> 			XSL Document
>>
>>
>**************************************************************************
>> *******
>>
>>
>> <xsl:template match="pub/toc">
>> 	<h3><xsl:value-of select="title"/></h3>
>> 		<table>
>> 			<xsl:for-each select="topic">
>> 		    	<tr>
>> 		    		<td>
>> 		    	    			<a>
>> 							<xsl:attribute
>> name="href">
>>
>> <xsl:value-of select="@toc1"/>
>> 							</xsl:attribute>
>> 							<xsl:value-of
>> select="."/>
>> 						</a>
>> 					</td>
>> 				</tr>
>> 			</xsl:for-each>
>> 		</table>
>> </xsl:template>
>>
>> also later in the stylesheet, i have the following <a></a> tag:
>>
>>
>> <xsl:template match="activity">
>> 	<a>
>> 		<xsl:attribute name="name">
>> 			<xsl:value-of select="@toc2"/>
>> 		</xsl:attribute>
>> 	</a>
>> 	<h4><xsl:value-of select="@type"/></h4>
>> 	<xsl:apply-templates/>
>> </xsl:template>
>>
>> I am unable to find the error. Please help. I would really appreciate it.
>>
>> Thanks a lot,
>> Dhruv
>>
>>
>>
>> Dhruv Raheja
>> Summer Intern (Documentation Center)
>> GE Transportation Systems
>> 2901 East Lake Road
>> Erie, PA 16531
>> Ph : (814) 875 - 2529 (O)
>>        (814) 824 - 2888 (R)
>>
>>
>>
>>
>
>
> XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


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


Current Thread