我正在通过Ant的XSLT任务运行一些XSL转换.我使用Saxon 9HE作为处理引擎.我有一种情况,输入XML文件都使用相同的DTD,但声明它在不同的地方.有些人声明它在当前目录中,有些在文件夹中,而其他人引用了URL.这是Ant脚本:
<?xml version="1.0" encoding="UTF-8"?>
<project name="PubXML2EHeader" default="transform">
<property name="data.dir.input" value="./InputXML"/>
<property name="data.dir.output" value="./converted-xml"/>
<property name="xslt.processor.location" value="D:\\saxon9he.jar"/>
<property name="xslt.processor.factory" value="net.sf.saxon.TransformerFactoryImpl"/>
<path id="saxon9.classpath" location="${xslt.processor.location}"/>
<target name="clean">
<delete dir="${data.dir.output}" includes="*.xml" failonerror="no"/>
</target>
<target name="transform" depends="clean">
<xslt destdir="${data.dir.output}"
extension=".xml"
failOnTransformationError="false"
processor="trax"
style="Transform.xsl"
useImplicitFileset="false"
classpathref="saxon9.classpath"
>
<outputproperty name="method" value="xml"/>
<outputproperty name="indent" value="yes"/>
<fileset dir="${data.dir.input}" includes="**/*.xml" excludes="Transform.xml"/>
<factory name="${xslt.processor.factory}"/>
</xslt>
</target>
</project>
Run Code Online (Sandbox Code Playgroud)
当我运行这个Ant脚本时,我得到这样的错误:
[xslt]:致命错误!XML解析器处理文件报告的I/O错误:/ D:/annurev.biophys.093008.131228.xml:http: //www.atypon.com/DTD/nlm-dtd/archivearticle.dtd原因:java.io.FileNotFoundException: http://www.atypon.com/DTD/nlm-dtd/archivearticle.dtd
我认为这些是由于Saxon无法访问DTD(在这种情况下实际上是防火墙问题).我不认为我关心验证输入,这是我认为这里发生的事情,我想跳过它.是否有一个属性我可以添加到XSLT Ant任务以阻止Saxon尝试读取DTD?
我有一个 Angular v13.3 项目,我试图在其中安装 ngx-graph 的 v8.0.0。当我运行命令时
npm install @swimlane/ngx-graph --save
Run Code Online (Sandbox Code Playgroud)
我得到以下输出。
npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! While resolving: demo-ui@0.0.0
npm ERR! Found: rxjs@7.5.5
npm ERR! node_modules/rxjs
npm ERR! rxjs@"~7.5.0" from the root project
npm ERR! peer rxjs@"^6.5.3 || ^7.4.0" from @angular/core@13.3.1
npm ERR! node_modules/@angular/core
npm ERR! @angular/core@"~13.3.0" from the root project
npm ERR! peer @angular/core@"10.x || 11.x || 12.x || 13.x" from @swimlane/ngx-graph@8.0.0
npm ERR! node_modules/@swimlane/ngx-graph
npm ERR! …Run Code Online (Sandbox Code Playgroud)