ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 40487] - XSLT task fails to pass factory attribute
Date Tue, 12 Sep 2006 21:38:00 GMT
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=40487>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=40487





------- Additional Comments From peterreilly@apache.org  2006-09-12 21:38 -------
Ok, I tried the following build file:
<?xml version="1.0"?>
<project name="ant-demo" default="test">

  <target name="clean">
    <delete quiet="yes" file="demoxslt.html"/>
  </target>

  <target name="test" depends="clean">
    <xslt in="simple.xml" out="demoxslt.html" style="copy.xsl">
      
      <factory name="net.sf.saxon.TransformerFactoryImpl">
        <attribute name="http://saxon.sf.net/feature/validation"
                   value="false"/>
      </factory>

    </xslt>
  </target>

  <target name="test-invalidvalue" depends="clean">
    <xslt in="simple.xml" out="demoxslt.html" style="copy.xsl">
      
      <factory name="net.sf.saxon.TransformerFactoryImpl">
        <attribute name="http://saxon.sf.net/feature/validation"
                   value="true or is it?"/>
      </factory>

    </xslt>
  </target>

  <target name="test-invalidname" depends="clean">
    <xslt in="simple.xml" out="demoxslt.html" style="copy.xsl">
      
      <factory name="net.sf.saxon.TransformerFactoryImpl">
        <attribute name="http://saxon.sf.net/feature/validation_or_is_it"
                   value="true"/>
      </factory>

    </xslt>
  </target>

</project>

if one does ant invalid-value -verbose
the xslt task throws a build exception:
with the following stack trace:

	at org.apache.tools.ant.taskdefs.XSLTProcess.process(XSLTProcess.java:696)

	... 18 more

--- Nested Exception ---

java.lang.IllegalArgumentException: DTD_VALIDATION must be a boolean

	at net.sf.saxon.Configuration.setConfigurationProperty(Configuration.java:2142)

	at
net.sf.saxon.TransformerFactoryImpl.setAttribute(TransformerFactoryImpl.java:342)

	at
org.apache.tools.ant.taskdefs.optional.TraXLiaison.getFactory(TraXLiaison.java:375)

This shows clearly that a) the attribute has been passed to saxon and
b) the attribute value has also been passed by ant to saxon.
So the issue is with the saxon xslt processor itself.

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org


Mime
View raw message