|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
Get inside! Sample the range of functionality easily built with JMSL Library for Time Series Data Analysis, Heat Maps, Portfolio Optimization, Monte Carlo Simulation, Stock Price Charting and more. Download Now! |
|
#1
|
|||
|
|||
|
XML/XSL BreadCrumb Trail
Im having problems with developing a solution for breadcrumb trail (navigation path - home > page 1 > page 1.1 > etc...) with xml data and xsl.
The data is stored in a sql server and is placed in a XMLDOM object......objRS.Save objXML, adPersistXML. The XML data is just a recordset containing all the pages for the website. Each row in the XML contains the following attributes/values: - PageID - ParentID - PageTitle <rs:data> <z:row PageID="1000" ParentID="0" PageTitle="Home"/> <z:row PageID="1001" ParentID="1000" PageTitle="Page1"/> <z:row PageID="1002" ParentID="1000" PageTitle="Page2"/> <z:row PageID="1003" ParentID="1001" PageTitle="Page1.1"/> .... .... </rs:data> In the XSL(T) object i have included some ASP parameters, the current PageID and the parent PageID for the current page. How should I design the XSL template to be able to get the following output (if the current PageID = 1003): Home > Page1 > Page1.1 Hope to hear from you!! |
|
#2
|
|||
|
|||
|
This is the complete XML source:
<xml xmlns:s="uuid:BDC6E3F0-6DA3-11d1-A2A3-00AA00C14882" xmlns:dt="uuid:C2F41010-65B3-11d1-A29F-00AA00C14882" xmlns:rs="urn:schemas-microsoft-com:rowset" xmlns:z="#RowsetSchema"> - <s:Schema id="RowsetSchema"> - <s:ElementType name="row" content="eltOnly" rs:CommandTimeout="30"> - <s:AttributeType name="PageID" rs:number="1"> <s:datatype dt:type="int" dt:maxLength="4" rs recision="10" rs:fixedlength="true" rs:maybenull="false" /> </s:AttributeType> - <s:AttributeType name="ParentID" rs:number="2" rs:nullable="true" rs:writeunknown="true"> <s:datatype dt:type="int" dt:maxLength="4" rs recision="10" rs:fixedlength="true" /> </s:AttributeType> - <s:AttributeType name="PageTitle" rs:number="3" rs:nullable="true" rs:writeunknown="true"> <s:datatype dt:type="string" rs:dbtype="str" dt:maxLength="200" /> </s:AttributeType> <s:extends type="rs:rowbase" /> </s:ElementType> </s:Schema> - <rs:data> <z:row PageID="1000" ParentID="0" PageTitle="Forsiden" /> <z:row PageID="1001" ParentID="1000" PageTitle="Side 1" /> <z:row PageID="1002" ParentID="1000" PageTitle="Side 2" /> <z:row PageID="1003" ParentID="1000" PageTitle="Side 3" /> <z:row PageID="1004" ParentID="1000" PageTitle="Side 4" /> <z:row PageID="1005" ParentID="1001" PageTitle="Side 1.1" /> <z:row PageID="1006" ParentID="1001" PageTitle="Side 1.2" /> <z:row PageID="1007" ParentID="1002" PageTitle="Side 2.1" /> <z:row PageID="1008" ParentID="1002" PageTitle="Side 2.2" /> <z:row PageID="1009" ParentID="1004" PageTitle="Side 4.1" /> <z:row PageID="1010" ParentID="1009" PageTitle="Side 4.1.1" /> <z:row PageID="1011" ParentID="1004" PageTitle="Side 4.2" /> <z:row PageID="1012" ParentID="1003" PageTitle="Side 3.1" /> <z:row PageID="1013" ParentID="1003" PageTitle="Side 3.2" /> <z:row PageID="1014" ParentID="1003" PageTitle="Side 3.3" /> <z:row PageID="1015" ParentID="1003" PageTitle="Side 3.4" /> <z:row PageID="1016" ParentID="1003" PageTitle="Side 3.5" /> </rs:data> </xml> |
![]() |
| Viewing: Dev Shed Forums > Programming Languages - More > XML Programming > XML/XSL BreadCrumb Trail |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|