Unknown attribute indent-number
Added by Anonymous about 16 years ago
Legacy ID: #5400934 Legacy Poster: Sebastien Roy (sebastienroy)
Hello! When saxon is used as xslt processor (version 9.1.0.2), I have the following error when I try to use java.util.prefs.AbstractPreferences.exportSubtree(OutputStream os) method. The stack trace is the following : java.lang.IllegalArgumentException: Unknown attribute indent-number at net.sf.saxon.Configuration.setConfigurationProperty(Configuration.java:3347) at net.sf.saxon.TransformerFactoryImpl.setAttribute(TransformerFactoryImpl.java:351) at java.util.prefs.XmlSupport.writeDoc(XmlSupport.java:247) at java.util.prefs.XmlSupport.export(XmlSupport.java:106) at java.util.prefs.AbstractPreferences.exportSubtree(AbstractPreferences.java:1596) ... This error is due to the following line of java.util.prefs.XmlSupport.writeDoc(XmlSupport.java:247) : tf.setAttribute("indent-number", new Integer(2)); Does someone had the same problem ? (and has a solution to resolve it ?) My current work arround is to not to use saxon for writing the prefs tree...
Replies (1)
RE: Unknown attribute indent-number - Added by Anonymous about 16 years ago
Legacy ID: #5401016 Legacy Poster: Michael Kay (mhkay)
The names of attributes that can be supplied to TransformerFactory.setAttribute() is implementation defined; and indent-number is not an attribute that the Saxon TransformerFactory recognizes. The spec says that it must raise an IllegalArgumentException rather than ignoring the call. This suggests that the application you are using is only written and validated to work with one particular XSLT processor (probably Xalan), and unless you can persuade them to make their code more portable, that's what you will have to use. It's worth a bug report, though. An application that only works with one XSLT processor shouldn't be using the JAXP factory mechanism to instantiate it.
Please register to reply