[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: Assistance with recursion

Subject: Re: Assistance with recursion
From: "Joris Gillis" <roac@xxxxxxxxxx>
Date: Fri, 09 Sep 2005 11:48:13 +0200
email contact of joris 2006
Tempore 07:43:39, die 09/09/2005 AD, hinc in xsl-list@xxxxxxxxxxxxxxxxxxxxxx scripsit Lynn Alford <lynn.alford@xxxxxxxxxx>:

Issues that I need help with:

Constructing a url that may consist of  url part - which needs to be first
if present but may not be present
<locator_url file_name="/courses/handbooks/2005/150_admission.html"
host_name="www.jcu.edu.au" protocol="http"/>

and a bookmark part which needs to be prepended with a # but that should
only happen when there is a bookmark part to follow
             <locator_bookmark bookmark_name="title_31161"/>

<xsl:template match="fl:tx.hyperlink" name="tx.hyperlink"> <ulink id="{@id}"> <xsl:attribute name="url"> <xsl:apply-templates select="fl:locator_url/@protocol"/> <xsl:apply-templates select="fl:locator_url/@host_name"/> <xsl:apply-templates select="fl:locator_url/@file_name"/> <xsl:apply-templates select="fl:locator_bookmark/@bookmark_name"/> </xsl:attribute> ??????? </ulink> </xsl:template>

<xsl:template match="@protocol"><xsl:value-of select="."/>://</xsl:template>
<xsl:template match="@bookmark_name">#<xsl:value-of select="."/></xsl:template>

also have the proper hyperlink text within the link rather than the link url.

This is going to be problematic.


The xml structure makes this very difficult:
what should happen if a hyperlink starts in one 'para' and ends in another? I don't sse any good answer to this dilemma.

consider this snippet of your input:

<tx.r style="FD133">The University structure defined in the HR system does not reflect the structure manually maintained on various Faculty/School/Discipline and Division/Office/Unit home pages.  This means that the highly visible page for
	<tx.hyperlink id="FD135" end="FD136">
		<locator_url file_name="/contacts/" host_name="www.jcu.edu.au" protocol="http"/>
	</tx.hyperlink>
</tx.r>
<tx.r style="FD134">JCU Co
	<tx.bookmark id="FD137" app_generated="true" end="FD138" name="_Hlt104622746"/>n
	<tx.bookmark_end id="FD138" begin="FD137"/>tacts
	<tx.hyperlink_end id="FD136" begin="FD135"/>
</tx.r>
ehat should happen

Note that the bookmarks are screwed up to. It seems like the application with which you built it, has done a bad job interpreting your input.

--
Joris Gillis (http://users.telenet.be/root-jg/me.html)
Deserta faciunt et innovationem appelant

Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.