You are viewing a plain text version of this content. The canonical link for it is here.
Posted to j-users@xalan.apache.org by "Kazakov, Victor D" <Vi...@ca.com> on 2014/08/12 23:19:27 UTC

Transform XSLT using Xalan in secure processing mode into XHTML

Hi,
I'm trying to use the updated version of Xalan (2.7.2) in secure mode and having issue with it not able to understand unknown attributes. The problem is, it prevents you from using any stylesheet that emits XHTML (in secure processing mode) because it disallows things like "colspan" attributes of "th" elements.

The associated changed file is here: http://svn.apache.org/viewvc/xalan/java/branches/xalan-j_2_7_1_maint/src/org/apache/xalan/processor/XSLTElementProcessor.java?r1=1359736&r2=1581058&pathrev=1581058&diff_format=h

See the attached example.
It returns this error:
Exception in thread "main" javax.xml.transform.TransformerConfigurationException: javax.xml.transform.TransformerException: org.xml.sax.SAXException: "colspan" attribute is not allowed on the th element!
javax.xml.transform.TransformerException: "colspan" attribute is not allowed on the th element!

Am I doing something wrong with the stylesheet or am I missing setting a feature on the transformer factory. How would you transform a stylesheet that emits (X)HTML in secure processing mode using Xalan?

Thanks,


Victor Kazakov
Sr Software Engineer

CA Technologies | Suite 500, HSBC Building | 885 West Georgia Street | Vancouver, BC, Canada, V6C 3G1
Office: +1 604 235 8398 | victor.kazakov@ca.com