dtd anomaly

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

dtd anomaly

Martin Gainty
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:
Unknown host www.bar.xyz
]>

apparently www.bar.xyz host is supposed to be a placeholder
but for the life of me I cannot see where 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

Reply | Threaded
Open this post in threaded view
|

RE: dtd anomaly

Uwe Schindler

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: [hidden email]

 

From: Martin Gainty <[hidden email]>
Sent: Monday, November 4, 2019 11:54 AM
To: [hidden email]
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:
Unknown host www.bar.xyz

]>

apparently www.bar.xyz host is supposed to be a placeholder
but for the life of me I cannot see where 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

 

Reply | Threaded
Open this post in threaded view
|

Re: dtd anomaly

Martin Gainty
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 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 <[hidden email]>
Sent: Monday, November 4, 2019 6:06 AM
To: [hidden email] <[hidden email]>
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: [hidden email]

 

From: Martin Gainty <[hidden email]>
Sent: Monday, November 4, 2019 11:54 AM
To: [hidden email]
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:
Unknown host www.bar.xyz

]>

apparently www.bar.xyz host is supposed to be a placeholder
but for the life of me I cannot see where 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

 

Reply | Threaded
Open this post in threaded view
|

Re: dtd anomaly

Martin Gainty
but using xml-maven-plugin i got the same error with maven as i did ant
  <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>


this is not my build and not my xml so the attempt here is to run 
the entire build from start to finish with no errors
if i can get either ant or maven xsl to accept host declaration www.bar.xyz then 
the entire build will be successful

can we delete lucene\src\main\xml\ENTITY_TermQuery.xml ?
or at least deprecate lucene\src\main\xml\ENTITY_TermQuery.xml ?

if we need to retain lucene\src\main\xml\ENTITY_TermQuery.xml
can we change the offending host declaration: www.bar.xyz
or edit out these invalid host declarations?

thanks
martin-


From: Martin Gainty <[hidden email]>
Sent: Monday, November 4, 2019 7:07 AM
To: [hidden email] <[hidden email]>
Subject: Re: dtd anomaly
 
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 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 <[hidden email]>
Sent: Monday, November 4, 2019 6:06 AM
To: [hidden email] <[hidden email]>
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: [hidden email]

 

From: Martin Gainty <[hidden email]>
Sent: Monday, November 4, 2019 11:54 AM
To: [hidden email]
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:
Unknown host www.bar.xyz

]>

apparently www.bar.xyz host is supposed to be a placeholder
but for the life of me I cannot see where 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

 

Reply | Threaded
Open this post in threaded view
|

Re: dtd anomaly

Jan Høydahl / Cominvent
the attempt here is to run the entire build from start to finish with no errors

Do you want to build lucene-java from source?

git clone https://github.com/apache/lucene-solr.git && cd lucene-solr/lucene && ant

If you are attempting something else, please describe what you try to achieve, and step by step what you do to get there

--
Jan Høydahl, search solution architect
Cominvent AS - www.cominvent.com

4. nov. 2019 kl. 13:13 skrev Martin Gainty <[hidden email]>:

but using xml-maven-plugin i got the same error with maven as i did ant
  <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>


this is not my build and not my xml so the attempt here is to run 
the entire build from start to finish with no errors
if i can get either ant or maven xsl to accept host declaration www.bar.xyz then 
the entire build will be successful

can we delete lucene\src\main\xml\ENTITY_TermQuery.xml ?
or at least deprecate lucene\src\main\xml\ENTITY_TermQuery.xml ?

if we need to retain lucene\src\main\xml\ENTITY_TermQuery.xml
can we change the offending host declaration: www.bar.xyz
or edit out these invalid host declarations?

thanks
martin-


From: Martin Gainty <[hidden email]>
Sent: Monday, November 4, 2019 7:07 AM
To: [hidden email] <[hidden email]>
Subject: Re: dtd anomaly
 
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 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 <[hidden email]>
Sent: Monday, November 4, 2019 6:06 AM
To: [hidden email] <[hidden email]>
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

 

From: Martin Gainty <[hidden email]> 
Sent: Monday, November 4, 2019 11:54 AM
To: [hidden email]
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:
Unknown host www.bar.xyz
]>

apparently www.bar.xyz host is supposed to be a placeholder
but for the life of me I cannot see where 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

Reply | Threaded
Open this post in threaded view
|

Re: dtd anomaly

Uwe Schindler
In reply to this post by Martin Gainty
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 <[hidden email]>:
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 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 <[hidden email]>
Sent: Monday, November 4, 2019 6:06 AM
To: [hidden email] <[hidden email]>
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: [hidden email]

 

From: Martin Gainty <[hidden email]>
Sent: Monday, November 4, 2019 11:54 AM
To: [hidden email]
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:
Unknown host www.bar.xyz

]>

apparently www.bar.xyz host is supposed to be a placeholder
but for the life of me I cannot see where 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
Reply | Threaded
Open this post in threaded view
|

Re: dtd anomaly

Martin Gainty
if i delete the invalid host DTD 
ENTITY_TermQuery.xml from xslt input folder everything works 

thanks uwe

From: Uwe Schindler <[hidden email]>
Sent: Monday, November 4, 2019 8:04 AM
To: [hidden email] <[hidden email]>
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 <[hidden email]>:
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 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 <[hidden email]>
Sent: Monday, November 4, 2019 6:06 AM
To: [hidden email] <[hidden email]>
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: [hidden email]

 

From: Martin Gainty <[hidden email]>
Sent: Monday, November 4, 2019 11:54 AM
To: [hidden email]
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:
Unknown host www.bar.xyz

]>

apparently www.bar.xyz host is supposed to be a placeholder
but for the life of me I cannot see where 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