daniellansun opened a new pull request, #3335: URL: https://github.com/apache/groovy/pull/3335
https://issues.apache.org/jira/browse/GROOVY-3905 XmlParser used to ignore prefix mappings that were not used as element or attribute names, so XmlNodePrinter dropped declarations such as `xmlns:xs` when the prefix appeared only inside an attribute value, for example `xsi:type="xs:string"`. The parser now records those bindings on the node, and the printer writes a binding when an attribute value contains a `prefix:local` token that is in scope and not already declared. Unused bindings are omitted. A null attribute map is treated as empty, so a node constructed with a null attributes map prints again. Attribute values that are any `CharSequence`, including a `GString` or `StringBuilder`, are scanned. Prefixes reserved by XML (those that start with `xml` in any case) are not redeclared. `testGroovy3905` now runs as a regular test; its assertions are unchanged. Additional coverage is in `XmlNodePrinterTest`. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
