public class XSIFormatterParticipant extends Object implements IFormatterParticipant
XSISchemaLocationSplit setting:
XSISchemaLocationSplit.none : don't format the xsi:schemaLocation
attribute value.XSISchemaLocationSplit.onElement : generate a line feed for each
namespace declaration:
<beans
xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:util="http://www.springframework.org/schema/util"
xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans.xsd
http://www.springframework.org/schema/util
http://www.springframework.org/schema/util/spring-util.xsd">
XSISchemaLocationSplit.onPair : generate a line feed for each
location declaration:
<beans
xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:util="http://www.springframework.org/schema/util"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util.xsd">
| Constructor and Description |
|---|
XSIFormatterParticipant() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
formatAttributeValue(String name,
String valueWithoutQuote,
Character quote,
DOMAttr attr,
XMLBuilder xml)
Format the given attribute value.
|
String |
getCurrentLineIndent(XMLBuilder xml,
XMLFormattingOptions formattingOptions) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetFormatElementCategorypublic boolean formatAttributeValue(String name, String valueWithoutQuote, Character quote, DOMAttr attr, XMLBuilder xml)
IFormatterParticipantThe formatter must take care of to generate attribute value with quote.
formatAttributeValue in interface IFormatterParticipantname - the attribute name.valueWithoutQuote - the attribute value without quote.quote - the quote and null otherwise. null quote means that
the formatter must not generate a quote in the xml
builder.attr - the DOM attribute and null otherwise.xml - the XML builder.public String getCurrentLineIndent(XMLBuilder xml, XMLFormattingOptions formattingOptions)
Copyright © 2022. All rights reserved.