XSL中的内部锚点如何工作? [英] how internal anchors in XSL work?

查看:128
本文介绍了XSL中的内部锚点如何工作?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有2个框架,它们都使用XSLT呈现了不同的html页面.意味着,容器html文件有2个框架,其来源是2个不同的XML文件.

i've 2 frames which both render different html pages using XSLT. Means, the container html file has 2 frames whose source are 2 different XML files.

左框架显示菜单,右框架显示内容.右框架上的内容具有不同的部分.

Left frame displays menus and right frame displays content. content on right frame has different sections.

我想实现以下目标:

如果我单击左框架上的超链接,它应该带我到右框架上的部分. 我可以使用锚点使用HTML轻松地做到这一点,但是我不知道如何使用XSL做到这一点.

if i click on a hyperlink on left frame, it should take me to the section on right frame. I can easily do that with HTML using anchors but i don't know how it can be done using XSL.

我的菜单链接来自一个静态的xml.但是右侧的xml每次都会更改,具体取决于上一页中单击的链接.

my menu linka are coming from an xml which will be static. but my xml on right side will change every time depending on the link that was clicked on last page.

让我解释一下:我有一个页面,在正确的框架上,我只有几个链接,例如a,b,c,d.当我单击a时,它将带我进入下一页(也分为2帧:左框架的内容是来自xml的菜单项,如果单击a和b,则右框架的内容将来自a.xml. .xml(如果单击了b).

let me explain: i've a page where on right frame, i've few links, say a, b ,c ,d. When i click on a, it will take me to next page (which is also divided into 2 frames : content for left frame are menu items coming from an xml, content for right frame will come from a.xml if a was clicked and b.xml if b was clicked.

现在,当在第一页上形成for时,我必须指定我的容器html的位置,该容器在下一页上保留2帧,并且我必须在其中传递'a'作为参数,以便正确的帧在下一页上可以调用a.xml.我将右框架的位置设置在容器html上.

now, when while forming the for a on first page, i've to specify the location of my container html holding 2 frames on the next page and i've to pass 'a' as a parameter in so that right frame on next page can call a.xml. I set the location of right frame in the container html on .

现在,我希望左侧框架上的菜单超链接应将我带到右侧框架上的所需部分.我还需要一种方法来读取在xsl中为左框架传递的url中的参数,以便它可以使我为右页更正xml.

Now, i want that my menu hyperlinks on left frame should take me to the desired section on right frame. I also need a way to read the parameter passed in url in my xsl for left frame so that it can take me to correct xml for right page.

推荐答案

通过尝试并查看会发生什么,这是最好的答案之一.我不明白为什么XSLT最终是HTML导致它最终不起作用的原因.

This is one of those questions that are best answered by just giving it try and seeing what happens. I can't see why it shouldn't work ultimately the result of the XSLT is HTML.

这篇关于XSL中的内部锚点如何工作?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆