You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* Secure processing is enabled by default. The secure boolean String parsing follows the syntax defined by {@link Boolean#parseBoolean(String)}. The secure
1633
+
* value in the key overrides instance settings given in the constructor.
1624
1634
* </p>
1625
1635
* <p>
1626
1636
* Using a {@link StringLookup} from the {@link StringLookupFactory}:
@@ -1644,7 +1654,7 @@ public StringLookup xmlEncoderStringLookup() {
* Secure processing is enabled by default. The secure boolean String parsing follows the syntax defined by {@link Boolean#parseBoolean(String)}. The secure
1679
+
* value in the key overrides instance settings given in the constructor.
1661
1680
* </p>
1662
1681
* <p>
1663
1682
* Using a {@link StringLookup} from the {@link StringLookupFactory}:
@@ -1677,13 +1696,14 @@ public StringLookup xmlStringLookup() {
1677
1696
* The examples above convert {@code "com/domain/document.xml:/path/to/node"} to the value of the XPath in the XML document.
1678
1697
* </p>
1679
1698
*
1680
-
* @param xPathFactoryFeatures XPathFactory features to set.
1699
+
* @param factoryFeatures DocumentBuilderFactory and XPathFactory features to set.
* Secure processing is enabled by default. The secure boolean String parsing follows the syntax defined by {@link Boolean#parseBoolean(String)}. The secure
1728
+
* value in the key overrides instance settings given in the constructor.
1700
1729
* </p>
1701
1730
* <p>
1702
1731
* Using a {@link StringLookup} from the {@link StringLookupFactory} fenced by the current directory ({@code Paths.get("")}):
@@ -1711,10 +1740,8 @@ public StringLookup xmlStringLookup(final Map<String, Boolean> xPathFactoryFeatu
* For example: "com/domain/document.xml:/path/to/node".
46
+
* Secure processing is enabled by default. The secure boolean String parsing follows the syntax defined by {@link Boolean#parseBoolean(String)}. The secure
47
+
* value in the key overrides instance settings given in the constructor.
* For example: "com/domain/document.xml:/path/to/node".
119
+
* Secure processing is enabled by default. The secure boolean String parsing follows the syntax defined by {@link Boolean#parseBoolean(String)}. The secure
120
+
* value in the key overrides instance settings given in the constructor.
82
121
* </p>
83
122
*
84
-
* @param key the key to be looked up, may be null
123
+
* @param key the key to be looked up, may be null.
85
124
* @return The value associated with the key.
86
125
*/
87
126
@Override
@@ -91,22 +130,42 @@ public String lookup(final String key) {
91
130
}
92
131
finalString[] keys = key.split(SPLIT_STR);
93
132
finalintkeyLen = keys.length;
94
-
if (keyLen != 2) {
95
-
throwIllegalArgumentExceptions.format("Bad XML key format [%s]; expected format is DocumentPath:XPath.",
96
-
key);
133
+
if (keyLen != KEY_PARTS_MIN && keyLen != KEY_PARTS_MAX) {
134
+
throwIllegalArgumentExceptions.format("Bad XML key format '%s'; the expected format is [secure=(true|false):]DocumentPath:XPath.", key);
0 commit comments