我有一个站点地图的 XML 文件,它是:
<?xml version="1.0" encoding="utf-8"?>
<siteMap>
<siteMapNode url="/" title="Home" tcmId="tcm:142-2-4">
<siteMapNode url="/controls" title="Controls" tcmId="tcm:142-1131-4" type="structure group" />
<siteMapNode url="/css" title="CSS" tcmId="tcm:142-1134-4" type="structure group" />
<siteMapNode url="/js" title="JS" tcmId="tcm:142-1133-4" type="structure group" />
<siteMapNode url="/xslt" title="XSLT" tcmId="tcm:142-1132-4" type="structure group" />
<siteMapNode url="/mobile" title="Mobile" tcmId="tcm:142-1165-4" type="structure group" />
<siteMapNode url="/mobilebiscuitml" title="Mobile BiscuitML" tcmId="tcm:142-1180-4" type="structure group" />
<siteMapNode url="/system" title="system" tcmId="tcm:142-136-4" type="structure group">
<siteMapNode url="/system/captcha" title="Captcha" tcmId="tcm:142-260-4" type="structure group" />
<siteMapNode url="/system/communicator" title="Communicator" tcmId="tcm:142-201-4" type="structure group" />
<siteMapNode url="/system/errorpages" title="Error Pages" tcmId="tcm:142-322-4" type="structure group" />
<siteMapNode url="/system/includes" title="includes" tcmId="tcm:142-138-4" type="structure group" />
<siteMapNode url="/system/masterpages" title="Master Pages" tcmId="tcm:142-139-4" type="structure group" />
<siteMapNode url="/system/outboundemail" title="Outbound Email" tcmId="tcm:142-199-4" type="structure group" />
<siteMapNode url="/system/SiteEdit" title="SiteEdit" tcmId="tcm:142-214-4" type="structure group" />
<siteMapNode url="/system/ui_widgets" title="UI Widgets" tcmId="tcm:142-320-4" type="structure group" />
<siteMapNode url="/system/webtemplates" title="Web Templates" tcmId="tcm:142-333-4" type="structure group" />
<siteMapNode url="/system/xml" title="Xml" tcmId="tcm:142-141-4" type="structure group" />
</siteMapNode>
<siteMapNode url="/App_GlobalResources" title="Website Labels" tcmId="tcm:142-295-4" type="structure group" />
<siteMapNode url="/Bpo.aspx" title=" BPO" tcmId="tcm:142-10830-64" type="page" />
<siteMapNode url="/Careers.aspx" title=" Careers" tcmId="tcm:142-10692-64" type="page" />
<siteMapNode url="/bpoHitech.aspx" title=" Hitech" tcmId="tcm:142-10710-64" type="page" />
<siteMapNode url="/news.aspx" title=" News" tcmId="tcm:142-10868-64" type="page" />
<siteMapNode url="/ISD.html" title="ISD" tcmId="tcm:142-11027-64" type="page" />
<siteMapNode url="/Services.aspx" title="Services" tcmId="tcm:142-10681-64" type="page" />
<siteMapNode url="/Knowledge.aspx" title="Knowledge" tcmId="tcm:142-11170-64" type="page" />
</siteMapNode>
</siteMap>
到目前为止我所做的:在 PT DWT TBB 的脚本标签中创建一个函数。其中,pageload() { id="@@Page.ID@@" } 这个 TBB 继承了一个(.cs 文件),其中我在一个类中定义了一个 id 属性。创建此类类型的对象并访问该属性。将此属性用作 XSLT 参数并通过 xsl 应用转换。
任何其他建议都会很好。