if i delete the invalid host DTD ENTITY_TermQuery.xml from xslt input folder everything works
thanks uwe ________________________________ From: Uwe Schindler <u...@thetaphi.de> Sent: Monday, November 4, 2019 8:04 AM To: dev@lucene.apache.org <dev@lucene.apache.org> Subject: Re: dtd anomaly This job is ran on every ant build on Jenkins so there is no problem. This task you mentioned does not even read that xml file, unless it's somehow misplaced in your build directory and detected as build.xml. We know that there is a bug with ant 1.10 but that was something else as far as I remember. Official Ant version to build is 1.8.2, but later ones also work. Please clean up your build directory (or checkout a new one). Uwe Am November 4, 2019 12:07:46 PM UTC schrieb Martin Gainty <mgai...@hotmail.com>: having used xsl parsing in other projects to create HTML I am attempting to run the ant build script lucene/build.xml <xslt in="${ant.file}" out="${javadoc.dir}/index.html" style="site/xsl/index.xsl" force="true"> <outputproperty name="method" value="html"/> <outputproperty name="version" value="4.0"/> <outputproperty name="encoding" value="UTF-8"/> <outputproperty name="indent" value="yes"/> <param name="buildfiles" expression="${process-webpages.buildfiles}"/> <param name="version" expression="${version}"/> <param name="defaultCodec" expression="${defaultCodec}"/> </xslt> but the build errors out on lucene\src\main\xml\ENTITY_TermQuery.xml attempting to find the Unknown host www.bar.xyz<http://www.bar.xyz> in so maybe my ant 1.10 is too old to parse the input xml? i tried running xsl thru maven xml-maven-plugin ________________________________ From: Uwe Schindler <u...@thetaphi.de> Sent: Monday, November 4, 2019 6:06 AM To: dev@lucene.apache.org <dev@lucene.apache.org> Subject: RE: dtd anomaly Hi, I am wondering what you are doing. If you run “ant documentation” from Solr’s or Lucene’s root folder, it should not even read those files – they are only relevant for the XML queryparser. Could it be that you have accidentally copied into some other folder where they are caught by some filename pattern? IMHO, the files should only be in XML query parser, but not in Lucene’s core. The files are there to test correct handling of external entities so they should be in some test folder. What are you exactly doing? Uwe ----- Uwe Schindler Achterdiek 19, D-28357 Bremen https://www.thetaphi.de eMail: u...@thetaphi.de From: Martin Gainty <mgai...@hotmail.com> Sent: Monday, November 4, 2019 11:54 AM To: dev@lucene.apache.org Subject: dtd anomaly here is a bug i cannot shake in when building lucene/site inside lucene/src/main/xml/ENTITY_TermQuery.xml <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE TermQuery [ <!ENTITY internalTerm "sumitomo"> <!ENTITY externalTerm SYSTEM "http://www.bar.xyz/external"> <!ENTITY % myParameterEntity "http://www.bar.xyz/param"> .... using ant build.xml: <!-- The XSL input file is ignored completely, but XSL expects one to be given, so we pass ourself (${ant.file}) here. The list of module build.xmls is given via string parameter, that must be splitted by the XSL at '|'. --> <xslt in="${ant.file}" out="${javadoc.dir}/index.html" style="site/xsl/index.xsl" force="true"> <outputproperty name="method" value="html"/> <outputproperty name="version" value="4.0"/> <outputproperty name="encoding" value="UTF-8"/> <outputproperty name="indent" value="yes"/> <param name="buildfiles" expression="${process-webpages.buildfiles}"/> <param name="version" expression="${version}"/> <param name="defaultCodec" expression="${defaultCodec}"/> </xslt> OR maven pom.xml <plugin> <groupId>org.codehaus.mojo</groupId> <artifactId>xml-maven-plugin</artifactId> <version>1.0.1</version> <executions> <execution> <id>validate</id> <phase>initialize</phase> <goals> <goal>transform</goal> </goals> <configuration> <forceCreation>true</forceCreation> <skip>false</skip> <outputDirectory>${project.build.directory}/target</outputDirectory> <transformationSets> <transformationSet> <dir>src/main/xml</dir> <stylesheet>C:/Maven-plugin/lucene-solr/lucene/site/xsl/index.xsl</stylesheet> <parameters> <parameter> <name>MyParam</name> <value>true</value> </parameter> </parameters> </transformationSet> </transformationSets> </configuration> </execution> </executions> <dependencies> <dependency> <groupId>net.sf.saxon</groupId> <artifactId>Saxon-HE</artifactId> <version>9.9.1-1</version> </dependency> </dependencies> </plugin> either build executing XSLT i get the same error: [ERROR] Failed to execute goal org.codehaus.mojo:xml-maven-plugin:1.0.1:transform (validate) on project analysis: Failed to transform input file lucene/src/main/xml/ENTITY_TermQuery.xml: I/O error reported by XML parser processing file://lucene/src/main/xml/ENTITY_TermQuery.xml: www.bar.xyz<http://www.bar.xyz>: Unknown host www.bar.xyz<http://www.bar.xyz> ]> apparently www.bar.xyz<http://www.bar.xyz/> host is supposed to be a placeholder but for the life of me I cannot see where www.bar.zyz<http://www.bar.zyz/> placeholder is replaced by a valid URL (i havent used DTD in at least 10 years and i am way out of my element when trying to resolve) any suggestions? martin -- Uwe Schindler Achterdiek 19, 28357 Bremen https://www.thetaphi.de