Dimitre - great stuff! You nailed the xml schema and my expected result.
I am using a xslt fragment to pull this information into the page. I am passing my pageIds into the xslt via the xslt fragment call. How can extend this code be able to process those passed in parameters in order to display the correct data from the xml?
This is a fragment example.
<%
Dim mm_xsl20 As MM.XSLTransform = New MM.XSLTransform()
mm_xsl20.setXML(Server.MapPath("/" & countryVar & "/" & langVar & "/titles.xml"))
mm_xsl20.setXSL(Server.MapPath("/data/xslt/breadcrumb.xsl"))
mm_xsl20.addParameter("pageID1", "hpPage")
mm_xsl20.addParameter("pageID1_char", "true")
mm_xsl20.addParameter("pageID2", "homePage")
mm_xsl20.addParameter("pageID2_char", "true")
Response.Write(mm_xsl20.Transform())
%>
#
I am feeding breadcrumbs into a page via xml and a xslt fragment. My problem is that my xslt is looped through and the div breadcrumbtrail is repeated How do I place that in the xslt so that the div breadcrumbtrail is only shown once and all of the if items are contained in it?
Thanks
<xsl:template match="/pageInfo/page">
<div id="breadcrumbtrail">
<xsl:if test="name[. = $pageID1]">
<a href="{url}"><xsl:value-of select="breadCrumbName"/></a>
<xsl:if test="$pageID1_char = 'true'">></xsl:if>
</xsl:if>
<xsl:if test="name[. = $pageID2]">
<a href="{url}"><xsl:value-of select="breadCrumbName"/></a>
<xsl:if test="$pageID2_char = 'true'">></xsl:if>
</xsl:if>
<xsl:if test="name[. = $pageID3]">
<a href="{url}"><xsl:value-of select="breadCrumbName"/></a>
<xsl:if test="$pageID3_char = 'true'">></xsl:if>
</xsl:if>
<xsl:if test="name[. = $pageID4]">
<a href="{url}"><xsl:value-of select="breadCrumbName"/></a>
</xsl:if>
</div>
</xsl:template>