Xslt和html5标签 [英] Xslt and html5 tags

查看:105
本文介绍了Xslt和html5标签的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个基本结构的xml文件

I have an xml file with a basic structure like this

< menubar>

<menubar>

< menu menu_id =" xxx">

<menu menu_id="xxx">

< menu_item  item_id =" yyy">

<menu_item  item_id="yyy">

< / menu_item>< / menu>< / menubar>

</menu_item></menu></menubar>

我有一个xslt文件处理这个并使用基本的xslt代码创建一个html菜单

I have an xslt file that processes this and creates an html menu using basic xslt code

< ul>< xsl:for-each select =" menubar">

<ul><xsl:for-each select="menubar">

< li>< xsl:value-of select =" menu>

<li><xsl:value-of select="menu>

< ul>< xsl:for-each select =" menu / menu_item">< xsl:apply-templates>

<ul><xsl:for-each select="menu/menu_item"><xsl:apply-templates>

所有浏览器都能正常运行,包括IE11所有模式。  它也在Edge工作,直到赢得10  11月更新。 它现在找不到<菜单标签。  如果我将其更改为任何html5标记,例如< audio>它也忽略了
它,但如果更改为menuz,例如它可以工作。 &NBSP;显然xslt将html5标签视为空格。 &NBSP;由于XML文件是在我们的客户站点从其配置数据生成的,因此我们的客户系统在Edge中被破坏。 &NBSP;是否有
的xslt语句会覆盖此行为?

Everything works fine in all browsers including IE11 all modes.   It also worked in Edge until the win 10  Nov update.  It now can not find the <menu tags.   If I change it to any html5 tag like <audio> it also ignores it, but if changed to menuz for example it works.   Apparently xslt treats html5 tags as white space.   Since the XML file is generated at our customers site from their configuration data our customers systems are broken in Edge.   Is there an xslt statement that overrides this behavior?

推荐答案

提到的提取值但是,您没有显示任何值,只是属性。你能举一个更实际的例子来证明这个问题吗?

The mentioned value-of extracts the value of the node, however you did not show any value, just attributes. Can you present a more real example that demonstrates the issue?

也许你甚至可以编写XML和XSLT的小型完整例子。是在浏览器端完成转换,还是通过编程方式完成转换?

Perhaps you can even prepare small full examples of XML and XSLT. Is transformation done on browser side, or by your code programmatically?


这篇关于Xslt和html5标签的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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