问题如下:
我有从数据库调用的xml数据,我使用xslt在浏览器上呈现xforms文档,顺便说一下它的旧firefox 3.6只是为了使用xforms扩展而安装的.
它正确呈现xforms文档,但控件无法正常工作,我无法提交表单,实例数据也没有填入输入.
我的xsl样式表如下:
<xsl:stylesheet version="1.0" xmlns="http://www.w3.org/1999/xhtml" xmlns:xsl="http://www.w3.org/1999/XSL/transform" xmlns:xf="http://www.w3.org/2002/xforms"><xsl:output method="xml"indent="yes"omit-xml-declaration="yes"media-type="application/xhtml+xml"DOCTYPE-public="-//W3C//DTD xhtml 1.0 Strict//EN"DOCTYPE-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd" /><xsl:template match="/"> <HTML xmlns="http://www.w3.org/1999/xhtml" xmlns:xf="http://www.w3.org/2002/xforms" dir="ltr" lang="es"> <head> <xf:model> <xf:instance> <data xmlns=""> <iCargo_ID>1</iCargo_ID> <sCargo_Desc>lalala</sCargo_Desc> <iConcurrencia_ID>1</iConcurrencia_ID> </data> </xf:instance> <xf:submission ID="prueba" action="EditarCargos.aspx" method="post"/> </xf:model> <link href="../CSS/style.CSS" rel="stylesheet" type="text/CSS" /> <Title><![cdaTA[Adicionar Cargos]]></Title> </head> <body> <div ></div> <div > <a href="../empleados/editarempleados.aspx"><![cdaTA[Empleados]]></a> <a href="../horarios/editarhorarios.aspx"><![cdaTA[Horarios]]></a> <a href="../jornadas/editarjornadas.aspx"><![cdaTA[Jornadas]]></a> <a href="../cargos/editarcargos.aspx"><![cdaTA[Cargos]]></a> <a href="../usuarios/editarusuarios.aspx"><![cdaTA[Usuarios]]></a> <a href="../profesiones/editarprofesiones.aspx"><![cdaTA[Profesiones]]></a> <a href="../reportes/Reportemarcaciones.aspx"><![cdaTA[Rep. de marcaciones]]></a> <a href="../cerrarSesion.aspx"><![cdaTA[Cerrar Sesión]]></a> </div> <div ID="main"> <div > <![cdaTA[Adicionar Cargos]]> </div> <div> <xf:input ref="sCargo_Desc"> <xf:label><![cdaTA[Cargo]]></xf:label> </xf:input> <div> <xf:submit submission="prueba"> <xf:label><![cdaTA[Guardar Cambios]]></xf:label> </xf:submit> </div> </div> <div> <a href="EditarCargos.aspx"><![cdaTA[Volver]]></a> </div> </div> </body> </HTML></xsl:template><xsl:template match="cargo[iCargo_ID]"> <iCargo_ID> <xsl:value-of select="iCargo_ID"/> </iCargo_ID> <sCargo_Desc> <xsl:value-of select="sCargo_Desc"/> </sCargo_Desc> <iConcurrencia_ID> <xsl:value-of select="iConcurrencia_ID"/> </iConcurrencia_ID></xsl:template><xsl:template match="cargo[not(iCargo_ID)]"> <iCargo_ID></iCargo_ID> <sCargo_Desc></sCargo_Desc> <iConcurrencia_ID></iConcurrencia_ID></xsl:template></xsl:stylesheet>
我的xml代码如下所示:
<cargo> <iCargo_ID>1</iCargo_ID> <sCargo_Desc>Jefe de Sistemas</sCargo_Desc> <iConcurrencia_ID>1</iConcurrencia_ID></cargo>
我认为问题是< xsl:output method =“xml”属性
,因为xforms需要xhtml来渲染,但是当我创建它时,firefox会抛出一个XSLT异常.
请帮忙!我到处搜索,我发现它有一些与firefox中的BUG有关但我希望有另一种方法可以使这项工作,你的帮助将非常感激和抱歉我的英语,我正在学习:D
解决方法 好吧,我没有找到解决方案,但使用了一种解决方法来使这项工作.由于问题出在firefox上,我不得不以另一种方式渲染样式表,所以我使用aspnet在代码后面预渲染样式表(我忘了提到我正在使用它),然后我把它写到了使用Response.Write的页面,它使用HTML作为xsl:output方法的魅力
总结以上是内存溢出为你收集整理的html – 通过xslt和xml错误呈现的xforms全部内容,希望文章能够帮你解决html – 通过xslt和xml错误呈现的xforms所遇到的程序开发问题。
如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)