Re: [Hypercontent-users] xsl question
Brought to you by:
alexvigdor
From: Carl B. <C.P...@hu...> - 2005-09-29 13:47:12
|
Hi Alex Well.... I used <xsl:when test="starts-with($sourceDirectory,'/departments/academic_departments/arts_social_science/')" > Which does seem to do the trick :) However, my bread crumbtrail doesn't work there so any ideas, please pass them on :) cheers Carl Carl Barrow wrote: > Hi Alex > > It seems that $sourceItem/@location gets a value down to > /departments/academic_departments but any lower it just doesn't get > one. my site map is being created correctly but my breadcrumb trail > doesn't work at this point ether. I guess I've missed something > somewhere. > > Variables as bellow: > <xsl:variable name = "navigation" select = > "/cms:wrapper/child::*/navigation"/> > <xsl:variable name = "sourceItem" select = > "$navigation//nav-item[@location=/cms:wrapper/cms:source/@path]"/> > <xsl:variable name = "sourceLoc" select = > "/cms:wrapper/cms:source/@path"/> > <xsl:variable name = "sourceDirectory" select = > "/cms:wrapper/cms:source/@directory"/> > <xsl:variable name = "sourceBaseName" select = > "/cms:wrapper/cms:source/@basename"/> > > Attached is my sitemap.xml file > > If you can see anything obvious please let me know :) > Cheers > Carl > > Alex Vigdor wrote: > >> Hi Carl, >> Offhand, I don't see any obvious problems. I would print out >> >> <xsl:value-of select="$sourceItem/@location"/:> >> >> just before or after that choose, for a debugging reality check - >> make sure the value you're testing matches the tests. >> >> -Alex >> >> On Sep 28, 2005, at 10:41 AM, Carl Barrow wrote: >> >>> Hi >>> >>> I want to use a different graphic in my layout depending on where >>> the page is in the site, I've tried the following but it always >>> goes though to the <xsl:otherwise> statement. Can anyone tell me why? >>> >>> Many thanks >>> Carl >>> >>> >>> <xsl:choose> >>> <xsl:when >>> test="starts-with($sourceItem/@location,'/departments/ >>> academic_departments/applied_science_tech/')"> >>> <a href = "http://www.hull.ac.uk"> <img src = >>> "http://www.acsweb.hull.ac.uk/media/pt_icon_default_alt_scitech.jpg" >>> width = "28" >>> height = "28" >>> border = "0" >>> class = "body" >>> alt = "University Home Page"/></a> >>> </xsl:when> >>> <xsl:when test="starts-with($sourceItem/@location,'/departments/ >>> academic_departments/arts_social_science/')" >>> > <a href >>> = "http://www.hull.ac.uk"> <img src = >>> "http://www.acsweb.hull.ac.uk/media/pt_icon_default_alt_artsoc.jpg" >>> width = "28" >>> height = "28" >>> border = "0" >>> class = "body" >>> alt = "University Home Page"/></a> >>> </xsl:when> >>> <xsl:otherwise> >>> <a href = "http://www.hull.ac.uk"> <img src = >>> "http://www.acsweb.hull.ac.uk/media/pt_icon_default_alt.gif" >>> width = "28" >>> height = "28" >>> border = "0" >>> class = "body" >>> alt = "University Home Page"/></a> >>> </xsl:otherwise> >>> </xsl:choose> >>> >>> -- >>> ************************************ >>> >>> Carl Barrow >>> Systems Integrator >>> e-Services >>> The University of Hull >>> Cottingham Road >>> Hull >>> HU6 7RX >>> Ext. 6838 >>> ************************************ >>> >>> >>> >>> ------------------------------------------------------- >>> This SF.Net email is sponsored by: >>> Power Architecture Resource Center: Free content, downloads, >>> discussions, >>> and more. http://solutions.newsforge.com/ibmarch.tmpl >>> _______________________________________________ >>> Hypercontent-users mailing list >>> Hyp...@li... >>> https://lists.sourceforge.net/lists/listinfo/hypercontent-users >> >> >> >> >> >> ------------------------------------------------------- >> This SF.Net email is sponsored by: >> Power Architecture Resource Center: Free content, downloads, >> discussions, >> and more. http://solutions.newsforge.com/ibmarch.tmpl >> _______________________________________________ >> Hypercontent-users mailing list >> Hyp...@li... >> https://lists.sourceforge.net/lists/listinfo/hypercontent-users > > > >------------------------------------------------------------------------ > ><?xml version="1.0" encoding="UTF-8"?> ><!DOCTYPE nav-template SYSTEM "http://hypercontent.sourceforge.net/dtd/navigation.dtd"> ><nav-template customLabel="Home" labelWith="custom" pattern="/index.xml" sortChildren="by-label"> > <nav-template pattern="/*/index.xml"> > <nav-template pattern="/*/*/*" /> > > <nav-template pattern="/*/*/index.xml"> > <nav-template pattern="/*/*/*/index.xml"> > <nav-template pattern="/*/*/*/*" /> > </nav-template> > </nav-template> > </nav-template> ></nav-template> > > > -- ************************************ Carl Barrow Systems Integrator e-Services The University of Hull Cottingham Road Hull HU6 7RX Ext. 6838 ************************************ |