如何使一个样式表中的XSLT 2.0和XSLT 3.0处理器有效地使用unparsed-text-lines()函数?
我认为我可以像这样使用function-available()函数,但这会返回XSLT 2.0处理器的语法错误.
<xsl:stylesheet
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:fn="http://www.w3.org/2005/xpath-functions"
xmlns:local="local"
version="2.0" exclude-result-prefixes="xs fn local">
<xsl:function name="local:unparsed-text-lines" as="xs:string+">
<xsl:param name="href" as="xs:string" />
<xsl:choose>
<xsl:when test="function-available('fn:unparsed-text-lines')">
<!-- XSLT 3.0 -->
<xsl:sequence select="fn:unparsed-text-lines($href)" />
</xsl:when>
<xsl:otherwise>
<!-- XSLT 2.0 -->
<xsl:sequence select="fn:tokenize(fn:unparsed-text($href), '\r\n|\r|\n')[not(position()=last() and .='')]" />
</xsl:otherwise>
</xsl:choose>
</xsl:function>
etc.
Run Code Online (Sandbox Code Playgroud) 我需要编写一个非常复杂的XSLT 1.0查询.
鉴于以下XML文件,我需要一个查询来获取多个报告中的作者集.(例如Antonio Rossi,因为他在报告1和2中都是如此).
<reports>
<report id="01">
<titolo>
I venti del Nord
</titolo>
<autori>
<autore>
Antonio Rossi
</autore>
<autore>
Mario Verdi
</autore>
</autori>
<versioni>
<versione numero="1.0">
<data>
13-08-1980
</data>
<autore>
Mario Verdi
</autore>
<commento>
versione iniziale
</commento>
</versione>
<versione numero="2.0">
<data>
14-08-1981
</data>
<autore>
Antonio Rossi
</autore>
<commento>
poche modifiche
</commento>
</versione>
</versioni>
</report>
<report id="02">
<titolo>
Le pioggie del Nord
</titolo>
<autori>
<autore>
Antonio Rossi
</autore>
<autore>
Luca Bianchi
</autore>
</autori>
<versioni>
<versione numero="1.0">
<data>
13-12-1991
</data>
<autore>
Antonio …Run Code Online (Sandbox Code Playgroud) 对于Delphi 2007,可以在[HKLM\SOFTWARE\Borland\BDS\5.0\RootDir]的系统注册表中找到IDE根目录.同样对于Delphi 2010,关键是[HKLM\SOFTWARE\CodeGear\BDS\7.0\RootDir].但是其他编译器呢?如果您有任何其他Delphi编译器,注册表中指向IDE根目录的是什么?
有哪些计算IDE根目录的注册表项:
如果您能为所有这些编译器提供建议,请提前致谢.
我使用Delphi 2010只有库存标准VCL库.目标系统是win32.
如果我有一个IXMLDocument的引用,我怎样才能获得IXMLDocument包装的底层对象的IXMLDOMDocument2接口?
我希望使用 require.js 来加载 CDN 托管的引导程序和 jquery。
我意识到之前已经问过这个问题(请参阅 Steve Eynon 对通过 RequireJS 加载 PopperJS 和 Bootstrap 的问题的回答 ,即使在使用推荐的 PopperJS 版本之后),但发布的答案对我不起作用。
主机 html 文件有内容...
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/css/bootstrap.min.css">
<script data-main="js/market-place" src="js/lib/requirejs/require.min.js"></script>
</head>
<body>
html content etc.
</body>
</html>
Run Code Online (Sandbox Code Playgroud)
文件 js/market-place.js 有内容...
console.log( 'market-place.js');
requirejs(['./decision-market-common'], function(){
console.log( 'common requirement met.');
require(['bootstrap'], function( bootstrap){
console.log( 'bootstrap requirement met.');
});
});
Run Code Online (Sandbox Code Playgroud)
文件 js/decision-market-common.js 有内容...
console.log( 'decision-market-common.js');
requirejs.config({
paths: {
jquery : 'https://code.jquery.com/jquery-3.3.1.slim.min',
popper : 'https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.3/umd/popper.min',
bootstrap: …Run Code Online (Sandbox Code Playgroud) delphi ×2
xslt ×2
bootstrap-4 ×1
installer ×1
javascript ×1
requirejs ×1
txmldocument ×1
xml ×1
xpath ×1
xslt-1.0 ×1
xslt-2.0 ×1