/** * Looks up a <a href="http://www.w3.org/TR/xproc/#f.system-property">system property</a> by the given name. * If no such system property is found, this method returns {@code null}. * * <p>This method consults {@linkplain com.xmlcalabash.util.XProcSystemPropertySet#BUILTIN the built-in} * {@link com.xmlcalabash.util.XProcSystemPropertySet}, and any other * {@code XProcSystemPropertySet}s that have been {@linkplain #addSystemPropertySet registered}.</p> * * @see #addSystemPropertySet * @see com.xmlcalabash.util.XProcSystemPropertySet#systemProperty * @param propertyName the name of the system property to look up * @return the string value of that system property, or {@code null} * @throws XProcException if any error occurs */ public String getSystemProperty(QName propertyName) throws XProcException { synchronized (systemPropertySets) { for (XProcSystemPropertySet propSet : systemPropertySets) { String value = propSet.systemProperty(this, propertyName); if (value != null) return value; } } return null; } }
/** * Looks up a <a href="http://www.w3.org/TR/xproc/#f.system-property">system property</a> by the given name. * If no such system property is found, this method returns {@code null}. * * <p>This method consults {@linkplain com.xmlcalabash.util.XProcSystemPropertySet#BUILTIN the built-in} * {@link com.xmlcalabash.util.XProcSystemPropertySet}, and any other * {@code XProcSystemPropertySet}s that have been {@linkplain #addSystemPropertySet registered}.</p> * * @see #addSystemPropertySet * @see com.xmlcalabash.util.XProcSystemPropertySet#systemProperty * @param propertyName the name of the system property to look up * @return the string value of that system property, or {@code null} * @throws XProcException if any error occurs */ public String getSystemProperty(QName propertyName) throws XProcException { synchronized (systemPropertySets) { for (XProcSystemPropertySet propSet : systemPropertySets) { String value = propSet.systemProperty(this, propertyName); if (value != null) return value; } } return null; } }