模块化XML& XSL表格 [英] Modular XML & XSL Sheets
问题描述
我想在我的XSL表中引用两个XML文档,但是我很难看到
访问它们时遇到问题。我想使用
document()函数(或允许我从
文件中读取的类似内容)访问它们,但我已经这样做了:
< xsl:variable name =" var" select =" document(''file1.xml'')/>
这不行。我也试过这个(用xsl:param,BTW)
< xsl:variable name =" var">
< xsl:copy-of select =" document(''file1.xml'')" />
< / xsl:variable>
这确实给了我内容,但我不能做$ var / * - 我得到一些关于片段的
错误。
有没有办法可以做到这一点?我需要能够读取两个XML
文档并一起操作它们。你知道。
问候
Johnny
***通过开发人员指南 http:/ /www.developersdex.com ***
不要只参加USENET ......获得奖励!
var / * - 我得到一些关于碎片的
错误。
有没有办法可以做到这一点?我需要能够读取两个XML
文档并一起操作它们。你知道。
问候
Johnny
***通过开发人员指南 http:/ /www.developersdex.com ***
不要只是参加USENET ......获得奖励!
< blockquote>
Johnny Ooi写道:
我想在我的XSL表中引用两个XML文档,但我是
访问它们时遇到问题。我想使用
document()函数(或允许我从
文件中读取的类似内容)访问它们,但我已经这样做了:
< ; xsl:variable name =" var" select =" document(''file1.xml'')/>
这不行。
有一个语法错误,你至少需要
< xsl:variable name =" var"选择= QUOT;文档( file1.xml)" />
,但您通常希望访问该文档中的某些元素,例如
< xsl:variable name =" var"选择= QUOT;文档( file1.xml)/根/元素" />
-
Martin Honnen
http://javaScript.FAQTs.com/
谢谢你,你能告诉我为什么,然后,如果我这样做:
< xsl:variable name =" var" select =" document(''Tree.xml'')/ Node" />
< xsl:copy-of select ="
I have two XML documents I want to refer to in my XSL sheet, but I''m
having problems accessing them. I want to access them both using the
document() function (or something similar that allows me to read from
files), but I''ve done this:
<xsl:variable name="var" select="document(''file1.xml'')/>
This doesn''t work. I''ve also tried this (with xsl:param as well, BTW)
<xsl:variable name="var">
<xsl:copy-of select="document(''file1.xml'')"/>
</xsl:variable>
And this does give me the contents, but I can''t do $var/* - I get some
error about fragments.
Is there a way I can do this? I need to be able to read in two XML
documents and manipulate them together, you see.
Regards
Johnny
*** Sent via Developersdex http://www.developersdex.com ***
Don''t just participate in USENET...get rewarded for it!
var/* - I get some
error about fragments.
Is there a way I can do this? I need to be able to read in two XML
documents and manipulate them together, you see.
Regards
Johnny
*** Sent via Developersdex http://www.developersdex.com ***
Don''t just participate in USENET...get rewarded for it!
Johnny Ooi wrote:
I have two XML documents I want to refer to in my XSL sheet, but I''m
having problems accessing them. I want to access them both using the
document() function (or something similar that allows me to read from
files), but I''ve done this:
<xsl:variable name="var" select="document(''file1.xml'')/>
This doesn''t work.
There is a syntax error, you need at least
<xsl:variable name="var" select="document(''file1.xml'')" />
but you usually want to access certain elements in that document e.g.
<xsl:variable name="var" select="document(''file1.xml'')/root/element" />
--
Martin Honnen
http://JavaScript.FAQTs.com/
Thanks for that, can you tell me why, then, if I do this:
<xsl:variable name="var" select="document(''Tree.xml'')/Node"/>
<xsl:copy-of select="
这篇关于模块化XML& XSL表格的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!