Web Images Videos Maps News Shopping Gmail more »
Recently Visited Groups | Help | Sign in
Google Groups Home
影响 Xalan redirect 多文件输出的 bug 和处理办法
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  1 message - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post will appear after it is approved by moderators
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Stephen Suen  
View profile   Translate to Translated (View Original)
 More options Mar 31 2006, 10:00 pm
From: "Stephen Suen" <stephen.s...@gmail.com>
Date: Sat, 1 Apr 2006 11:00:57 +0800
Local: Fri, Mar 31 2006 10:00 pm
Subject: [Tech Tips]影响 Xalan redirect 多文件输出的 bug 和处理办法

 XSLT 1.0 不支持将转换的结果输出到多文件,为了将部分结果输出到除了默认输出文档之外的其它文件,必须使用扩展。

在 Xalan-Java 2.7 中,可以使用
redirect<http://xml.apache.org/xalan-j/extensionslib.html#redirect>扩展达到多输出文件的目的。不过,以下几个
bug 将影响对该扩展的使用:

   - XALANJ-2287
<http://issues.apache.org/jira/browse/XALANJ-2287>:element-available
   在对应的元素并未实际使用时,将返回假,甚至抛出异常导致转换失败。这的问题通常不会构成影响,因为通常你肯定在测试可用性之后就实际的调用这些扩展。
   - XALANJ-2288 <http://issues.apache.org/jira/browse/XALANJ-2288>:XSLTC
   中的 redirect
   无法正确地处理相对文件名的基目录。输出文件没有输出到相对默认输出文档的目录中,而是输出到相对当前工作目录的目录中。Xalan-Java
   解释处理器没有这个问题。解决这个问题的办法一个是借助全局样式表参数传递基目录,或者干脆使用 Xalan-Java 的解释处理器。
   - *XALANJ-1522* <http://issues.apache.org/jira/browse/XALANJ-1522>:在
   Xalan-Java 解释处理器中,function-available 对 exstl:node-set 将返回假。这是因为 Xalan
   内部实现的扩展名为 nodeSet,node-set 只是别名。别名处理的错误导致 function-available 返回错误的值。XSLTC
   没有这个问题。解决这个问题的办法是用利用 function-available 分别测试 exstl:nodeSet 和
   exstl:node-set,若后者可用(说明 bug 已经修复)则用,不可用则用前者;或者可以使用 Xalan 的
nodeset<http://xml.apache.org/xalan-j/extensionslib.html#nodeset>扩展;又或者干脆使用
XSLTC 处理器。

此外需要注意的是 Xalan 中,无论是解释处理器还是 XSLTC 都不支持 exslt 的  document 扩展。实际上,如果使用
Xalan,现在就只有用 Xalan 的 redirect  了。这个扩展在 XSLTC 中命名为
output<http://xml.apache.org/xalan-j/extensions_xsltc.html#redirect_ext>,且具有不同的
URI,不过这两个别名在两种处理其中都可以使用。

最后,如果你使用 DocBook 处理文档,需要注意的是 DocBook 的 HTML chunker 必须使用 Xalan-Java
的解释处理器,XSLTC 目前不能用于处理 DocBook 样式表。不幸的是 JDK 1.5 中,默认使用的是 XSLTC,所以你需要从 Apache
下载 Xalan-Java 用来处理 DocBook 文档。

--
Stephen Suen
stephen.s...@gmail.com


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »

Create a group - Google Groups - Google Home - Terms of Service - Privacy Policy
©2009 Google