Summary
Adds an implementation-specific property http://www.oracle.com/xml/jaxp/properties/xsltcIsStandalone
to be supported by the XSLTC Serializer.
Problem
The legacy property http://www.oracle.com/xml/is-standalone for the XSLTC Serializer, introduced through JDK-7150637, does not comply with the new specification for Implementation-specific Features and Properties. In addition, it was intended to perform similar functions to the isStandalone
property added through JDK-8259352 but was insufficiently specified, but the prefix http://www.oracle.com/xml needs to be standardized as http://www.oracle.com/xml/properties and name is-standalone as isStandalone.
Solution
Create a new property http://www.oracle.com/xml/jaxp/properties/xsltcIsStandalone
for the XSLTC Serializer. The property shall be named with the same, standard prefix http://www.oracle.com/xml/jaxp/properties/
and have the same function as 'isStandalone
for DOMLS. The property name will begin with an additional prefix xsltc
to differentiate it from the isStandalone
property for DOMLS so that their corresponding System properties will not affect each other.
Continue supporting the legacy property http://www.oracle.com/xml/is-standalone
for backward compatibility.
Specification
In java.xml module-summary (java.xml/module-info.java), add the following items.
In table Processors, add the following item:
ID Name How to set the property
XSLTC Serializer XSLTC Serializer Transformer t = TransformerFactory.newInstance().newTransformer();
t.setOutputProperty(name, value);
In table Features and Properties, add the following item:
Name: xsltcIsStandalone
Description: indicates that the XSLTC serializer should treat the output as a standalone document. The property can be used to ensure a newline is written after the XML declaration. Unlike the property OMIT_XML_DECLARATION, this property does not have an effect on whether an XML declaration should be written out.
This property behaves similar to that for DOMLS above, except that it is for the XSLTC Serializer and its value is a String.
System Property: yes
jaxp.properties: yes
Value:
Type: String
Value: yes/no
Default: no
Security: no
Supported Processor: XSLTC Serializer
Since: 17
Change note 3 for table Features and Properties to reflect the addition of a string type property:
- [3] The value must be exactly as listed in this table, case-sensitive. The value type for the corresponding System Property is String. For boolean type, the system property is true only if it is "true" and false otherwise.
+ [3] The value must be exactly as listed in this table, case-sensitive. The value of the corresponding System Property is the String representation of the property value. If the type is boolean, the system property is true only if it is "true"; If the type is String, the system property is true only if it is exactly the same string representing the positive value (e.g. "yes" for xsltcIsStandalone); The system property is false otherwise.
Attached spec_01_8260858.zip
Convenient link: http://cr.openjdk.java.net/~joehw/jdk17/8260858/spec_01/java.xml/module-summary.html
- csr of
-
JDK-8260858 Implementation specific property xsltcIsStandalone for XSLTC Serializer
-
- Resolved
-