Thread: [Hypercontent-users] xsl question
Brought to you by:
alexvigdor
From: Carl B. <C.P...@hu...> - 2005-09-28 14:41:39
|
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 ************************************ |
From: Carl B. <C.P...@hu...> - 2007-01-31 11:33:53
|
***************************************************************************************** To view the terms under which this email is distributed, please go to http://www.hull.ac.uk/legal/email_disclaimer.html ***************************************************************************************** |
From: Alex V. <al...@bi...> - 2007-01-31 14:26:55
|
Hi Carl, The pattern must exactly match the pattern of the doctype in = project-=20 definition.xml - the XSLT string comparison has no knowledge of how =20 to resolve wildcard patterns, unfortunately. I would think something =20= like your third example should work, assuming the doctype pattern is =20 "/*/*/*.xml". Perhaps in your project definition it is just "/*/*/=20 *" ? If you still have problems, send a copy of your project =20 definition and I'll have a look. Cheers, Alex On Jan 31, 2007, at 6:33 AM, Carl Barrow wrote: > Hi Alex, > > > > Just a quick xsl question if that=92s okay. I want to include =20 > something an all pages in a particular directory. > > It=92s easy enough to include it on specific page using: > > <xsl:when test=3D"($sourceItem/@location=3D'/undergraduate/courses/=20 > index.xml')"> > > I thought I might be able use: > > <xsl:when test=3D"($sourceItem/@pattern=3D'/undergraduate/courses/=20 > *.xml')"> but that didn=92t work. > > I also tried: > > <xsl:when test=3D"(starts-with($sourceItem/@directory,'/undergraduate/=20= > courses')and($sourceItem/@pattern=3D'/*/*/*.xml'))"> > > But again that didn=92t work. > > > > Do you have any pointers? > > > > Cheers > > Carl > > > > ************************************* > > Carl Barrow > Systems Integrator > e-Services > The University of Hull > Cottingham Road > Hull > HU6 7RX > Ext. 6838 > > http://www.hull.ac.uk/cms > > ************************************* > > > > **********************************************************************=20= > ******************* > To view the terms under which this email is distributed, please go =20 > to http://www.hull.ac.uk/legal/email_disclaimer.html > **********************************************************************=20= > *******************---------------------------------------------------=20= > ---------------------- > Take Surveys. Earn Cash. Influence the Future of IT > Join SourceForge.net's Techsay panel and you'll get the chance to =20 > share your > opinions on IT & business topics through brief surveys - and earn cash > http://www.techsay.com/default.php?=20 > page=3Djoin.php&p=3Dsourceforge&CID=3DDEVDEV____________________________= ____=20 > _______________ > Hypercontent-users mailing list > Hyp...@li... > https://lists.sourceforge.net/lists/listinfo/hypercontent-users |
From: Carl P B. <C.P...@hu...> - 2007-01-31 15:50:28
Attachments:
project-definition.xml
|
***************************************************************************************** To view the terms under which this email is distributed, please go to http://www.hull.ac.uk/legal/email_disclaimer.html ***************************************************************************************** |
From: Alex V. <al...@bi...> - 2007-02-01 13:34:01
|
Hi Carl, In that case, I'd suggest trying <xsl:when test=3D"(starts-with($sourceItem/@directory,'/undergraduate/=20= courses')and($sourceItem/@pattern=3D'/**/*.xml'))"> Cheers, Alex On Jan 31, 2007, at 10:49 AM, Carl P Barrow wrote: > Hi Alex, > > > > Thanks for the info. I am assuming that because I=92m defining /**/=20 > *.xml in my project definition in my project definition that=92s why =20= > it=92s not working. I am defining /undergraduate/courses/*/index.xml =20= > but if I define /undergraduate/courses/*.xml it stops my =20 > sitemap.xml file form working. But, defining /undergraduate/=20 > courses/*/*.xml doesn=92t. I=92ve attached the project definition for = =20 > you to take a look at. > > > > Cheers > > Carl > > > > ************************************* > > Carl Barrow > Systems Integrator > e-Services > The University of Hull > Cottingham Road > Hull > HU6 7RX > Ext. 6838 > > http://www.hull.ac.uk/cms > > ************************************* > > From: hyp...@li... =20 > [mailto:hyp...@li...] On Behalf =20= > Of Alex Vigdor > Sent: 31 January 2007 14:26 > To: Hypercontent-users List > Subject: Re: [Hypercontent-users] xsl question > > > > Hi Carl, > > The pattern must exactly match the pattern of the =20 > doctype in project-definition.xml - the XSLT string comparison has =20 > no knowledge of how to resolve wildcard patterns, unfortunately. I =20= > would think something like your third example should work, assuming =20= > the doctype pattern is "/*/*/*.xml". Perhaps in your project =20 > definition it is just "/*/*/*" ? If you still have problems, send =20 > a copy of your project definition and I'll have a look. > > > > Cheers, > > Alex > > > > On Jan 31, 2007, at 6:33 AM, Carl Barrow wrote: > > > > > Hi Alex, > > > > Just a quick xsl question if that=92s okay. I want to include =20 > something an all pages in a particular directory. > > It=92s easy enough to include it on specific page using: > > <xsl:when test=3D"($sourceItem/@location=3D'/undergraduate/courses/=20 > index.xml')"> > > I thought I might be able use: > > <xsl:when test=3D"($sourceItem/@pattern=3D'/undergraduate/courses/=20 > *.xml')"> but that didn=92t work. > > I also tried: > > <xsl:when test=3D"(starts-with($sourceItem/@directory,'/undergraduate/=20= > courses')and($sourceItem/@pattern=3D'/*/*/*.xml'))"> > > But again that didn=92t work. > > > > Do you have any pointers? > > > > Cheers > > Carl > > > > ************************************* > > Carl Barrow > Systems Integrator > e-Services > The University of Hull > Cottingham Road > Hull > HU6 7RX > Ext. 6838 > > http://www.hull.ac.uk/cms > > ************************************* > > > > **********************************************************************=20= > ******************* > > To view the terms under which this email is distributed, please go =20 > to http://www.hull.ac.uk/legal/email_disclaimer.html > > **********************************************************************=20= > *******************---------------------------------------------------=20= > ---------------------- > > Take Surveys. Earn Cash. Influence the Future of IT > > Join SourceForge.net's Techsay panel and you'll get the chance to =20 > share your > > opinions on IT & business topics through brief surveys - and earn cash > > http://www.techsay.com/default.php?=20 > page=3Djoin.php&p=3Dsourceforge&CID=3DDEVDEV____________________________= ____=20 > _______________ > > Hypercontent-users mailing list > > Hyp...@li... > > https://lists.sourceforge.net/lists/listinfo/hypercontent-users > > > > <project-definition.xml> > **********************************************************************=20= > ******************* > To view the terms under which this email is distributed, please go =20 > to http://www.hull.ac.uk/legal/email_disclaimer.html > **********************************************************************=20= > ******************* |
From: Alex V. <av...@co...> - 2005-09-28 14:59:13
|
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 |
From: Carl B. <C.P...@hu...> - 2005-09-29 11:47:43
Attachments:
sitemap.xml
|
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 -- ************************************ Carl Barrow Systems Integrator e-Services The University of Hull Cottingham Road Hull HU6 7RX Ext. 6838 ************************************ |
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 ************************************ |
From: Alex V. <av...@co...> - 2005-09-29 15:18:16
|
Hi Carl, This reminds me of a problem that came up a while ago using the "//" axis. Try this, and let me know how it works <xsl:variable name = "sourceItem" select = "$navigation/descendant-or-self::nav-item[@location=/cms:wrapper/cms: source/@path]"/> Cheers, Alex On Sep 29, 2005, at 9:46 AM, Carl Barrow wrote: > 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 > ************************************ > > > > ------------------------------------------------------- > 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 |
From: Carl B. <C.P...@hu...> - 2005-09-29 15:59:02
|
Hi Alex That makes no difference to my breadcrumb problem which is really confusing me. If you take a look at https://port.hull.ac.uk/campus/departments/academic_departments/applied_science_tech/test.html You will notice that the breadcrumb trail works fine, as it does in most of the site. But at the following it just doesn't appear: https://port.hull.ac.uk/campus/departments/academic_departments/applied_science_tech/index.html https://port.hull.ac.uk/campus/departments/academic_departments/arts_social_science/index.html https://port.hull.ac.uk/campus/departments/academic_departments/health_social_care/index.html https://port.hull.ac.uk/campus/departments/academic_departments/ifl/index.html Any more ideas? Cheers Carl Alex Vigdor wrote: > Hi Carl, > This reminds me of a problem that came up a while ago using the > "//" axis. Try this, and let me know how it works > > <xsl:variable name = "sourceItem" select = > "$navigation/descendant-or-self::nav-item[@location=/cms:wrapper/cms: > source/@path]"/> > > Cheers, > Alex > > On Sep 29, 2005, at 9:46 AM, Carl Barrow wrote: > >> 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 >> ************************************ >> >> >> >> ------------------------------------------------------- >> 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 -- ************************************ Carl Barrow Systems Integrator e-Services The University of Hull Cottingham Road Hull HU6 7RX Ext. 6838 ************************************ |
From: Alex V. <av...@co...> - 2005-09-29 16:04:25
|
Hi Carl, Can you verify that those pages actually show up in the site map? I didn't see an attachment come through earlier. You can always add an empty "output" element to your site-map xml-doc, and this will give you the resolved site map, which you could then pass along the URL for. Cheers, Alex On Sep 29, 2005, at 11:58 AM, Carl Barrow wrote: > Hi Alex > That makes no difference to my breadcrumb problem which is really > confusing me. > If you take a look at > https://port.hull.ac.uk/campus/departments/academic_departments/ > applied_science_tech/test.html > You will notice that the breadcrumb trail works fine, as it does in > most of the site. But at the following it just doesn't appear: > https://port.hull.ac.uk/campus/departments/academic_departments/ > applied_science_tech/index.html > https://port.hull.ac.uk/campus/departments/academic_departments/ > arts_social_science/index.html > https://port.hull.ac.uk/campus/departments/academic_departments/ > health_social_care/index.html > https://port.hull.ac.uk/campus/departments/academic_departments/ifl/ > index.html > > Any more ideas? > > Cheers > Carl > > > Alex Vigdor wrote: > >> Hi Carl, >> This reminds me of a problem that came up a while ago using the >> "//" axis. Try this, and let me know how it works >> >> <xsl:variable name = "sourceItem" select = >> "$navigation/descendant-or-self::nav-item[@location=/cms:wrapper/cms: >> source/@path]"/> >> >> Cheers, >> Alex >> >> On Sep 29, 2005, at 9:46 AM, Carl Barrow wrote: >> >>> 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 >>> ************************************ >>> >>> >>> >>> ------------------------------------------------------- >>> 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 > > > -- > ************************************ > > 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 |