]> granicus.if.org Git - docbook-dsssl/commitdiff
Webhelp ant script changes - HTML transformation support for WebHelp - Uses Tagsoup...
authorKasun Gajasinghe <kasunbg@gmail.com>
Mon, 3 Oct 2011 19:13:27 +0000 (19:13 +0000)
committerKasun Gajasinghe <kasunbg@gmail.com>
Mon, 3 Oct 2011 19:13:27 +0000 (19:13 +0000)
tagsoup-1.2.1.jar is added to trunk/xsl-webhelpindexer/lib/

xsl/webhelp/build.xml
xsl/webhelp/xsl/webhelp.xsl

index 502af21733ba53c9137e1e2dd4b62e883f38a10e..7b0990a3002a5300c78e51ae4c50fef5f3112d5b 100644 (file)
@@ -10,6 +10,7 @@
         <pathelement location="${extensions.dir}/webhelpindexer.jar"/>
        <pathelement location="${extensions.dir}/lucene-analyzers-3.0.0.jar"/>
        <pathelement location="${extensions.dir}/lucene-core-3.0.0.jar"/>
+       <pathelement location="${extensions.dir}/tagsoup-1.2.1.jar"/>
     </path>
 
   <condition property="perform-validation-dtd">
 
        <echo>Indexing html files in ${output-dir}/content</echo>
 
-       <java classname="com.nexwave.nquindexer.IndexerMain"> 
+       <java classname="com.nexwave.nquindexer.IndexerMain" fork="true"
          <sysproperty key="htmlDir" value="${output-dir}/content"/>
          <sysproperty key="indexerLanguage" value="${webhelp.indexer.language}"/>
          <sysproperty key="htmlExtension" value="${html.extension}"/>
          <sysproperty key="doStem" value="${enable.stemming}"/>
          <sysproperty key="tocFile" value="${toc.file}"/>
 
+        <!--TagSoup SAX Parser for parsing even the bad html contents. see 
+             http://sourceforge.net/tracker/?func=detail&aid=3401185&group_id=21935&atid=373750-->
+         <sysproperty key="org.xml.sax.driver" value="org.ccil.cowan.tagsoup.Parser"/>
+         <sysproperty key="javax.xml.parsers.SAXParserFactory" value="org.ccil.cowan.tagsoup.jaxp.SAXFactoryImpl"/>
+
+         <!-- Uncomment the following if Xerces is your preference as the SAX XML Parser. Note that the indexing will fail with Xerces
+             if the html files are not XML-conformance -->
+        <!--sysproperty key="org.xml.sax.driver" value="org.apache.xerces.parsers.SAXParser"/>       
+         <sysproperty key="javax.xml.parsers.SAXParserFactory" value="org.apache.xerces.jaxp.SAXParserFactoryImpl"/-->
+
+         <!-- Debug the indexer on port 5005 via remote-debug -->
+         <!--jvmarg line="-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=5005"/-->
          <classpath>
            <path refid="classpath"/>
            <pathelement location="/usr/share/java/xercesImpl.jar"/>    
          </classpath>
        </java> 
  
-       <!--indexertask htmldir="${output-dir}/content" indexerLanguage="${webhelp.indexer.language}"/-->
-
        <delete>
          <fileset dir="${output-dir}/content/search" includes="*.props"/>
        </delete>
index 6df50708277160fca524050de80f87fb2970ffea..acdf3830c0ff1386cdd1865119da4f92e0ba26fa 100644 (file)
@@ -8,7 +8,6 @@
 
     <xsl:import href="../../xhtml/chunk.xsl"/>
 
-
     <xsl:output
             method="html"
             encoding="utf-8"
@@ -20,7 +19,6 @@
             <xsl:otherwise>html</xsl:otherwise>
         </xsl:choose>
     </xsl:param>
-    
 
     <!-- webhelp-specific params! -->
     <!-- To be added to normal params file someday -->