Package com.helger.schematron.pure.model
Class PSNS
java.lang.Object
com.helger.schematron.pure.model.PSNS
- All Implemented Interfaces:
com.helger.commons.lang.ICloneable<PSNS>,IPSClonableElement<PSNS>,IPSElement,IPSHasForeignAttributes
@NotThreadSafe
public class PSNS
extends Object
implements IPSClonableElement<PSNS>, IPSHasForeignAttributes
A single Schematron ns-element.
Specification of a namespace prefix and URI. The required prefix attribute is an XML name with no colon character. The required uri attribute is a namespace URI.
NOTE: Because the characters allowed as names may change in versions of XML subsequent to W3C XML 1.0, the ISO/IEC 19757-2 (RELAX NG Compact Syntax) schema for Schematron does not constrain the prefix to particular characters.
In an ISO Schematron schema, namespace prefixes in context expressions, assertion tests and other query expressions should use the namespace bindings provided by this element. Namespace prefixes should not use the namespace bindings in scope for element and attribute names.
Specification of a namespace prefix and URI. The required prefix attribute is an XML name with no colon character. The required uri attribute is a namespace URI.
NOTE: Because the characters allowed as names may change in versions of XML subsequent to W3C XML 1.0, the ISO/IEC 19757-2 (RELAX NG Compact Syntax) schema for Schematron does not constrain the prefix to particular characters.
In an ISO Schematron schema, namespace prefixes in context expressions, assertion tests and other query expressions should use the namespace bindings provided by this element. Namespace prefixes should not use the namespace bindings in scope for element and attribute names.
- Author:
- Philip Helger
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddForeignAttribute(String sAttrName, String sAttrValue) com.helger.xml.microdom.IMicroElementgetClone()getUri()booleanbooleanbooleanisValid(IPSErrorHandler aErrorHandler) Check if this element is specified completely.static PSNSofPrefixAndUri(String sPrefix, String sUri) Factory method to create a newPSNSwith certain "prefix" and "uri" valuesvoidvoidtoString()voidvalidateCompletely(IPSErrorHandler aErrorHandler) Check if this element is specified completely.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface com.helger.schematron.pure.model.IPSHasForeignAttributes
addForeignAttributes
-
Constructor Details
-
PSNS
public PSNS()
-
-
Method Details
-
isValid
Description copied from interface:IPSElementCheck if this element is specified completely. This method stops at the first encountered error.- Specified by:
isValidin interfaceIPSElement- Parameters:
aErrorHandler- The error handler where the error details are stored. May not benull.- Returns:
trueif all mandatory fields are set and the element is valid,falseotherwise.
-
validateCompletely
Description copied from interface:IPSElementCheck if this element is specified completely. This method performs all validations independent of the number of encountered error.- Specified by:
validateCompletelyin interfaceIPSElement- Parameters:
aErrorHandler- The error handler where the error details are stored. May not benull.
-
isMinimal
public boolean isMinimal()- Specified by:
isMinimalin interfaceIPSElement- Returns:
trueif this element conforms to the Schematron minimal syntax,falseotherwise.
-
addForeignAttribute
- Specified by:
addForeignAttributein interfaceIPSHasForeignAttributes
-
hasForeignAttributes
public boolean hasForeignAttributes()- Specified by:
hasForeignAttributesin interfaceIPSHasForeignAttributes
-
getAllForeignAttributes
@Nonnull @ReturnsMutableCopy public com.helger.commons.collection.impl.ICommonsOrderedMap<String,String> getAllForeignAttributes()- Specified by:
getAllForeignAttributesin interfaceIPSHasForeignAttributes
-
getUri
- Returns:
- The namespace URI. May be
null.
-
setUri
- Parameters:
sUri- The namespace URI. May benull.
-
getPrefix
- Returns:
- The namespace prefix. May be
null.
-
setPrefix
- Parameters:
sPrefix- The namespace prefix to use. May benull.
-
getAsMicroElement
- Specified by:
getAsMicroElementin interfaceIPSElement- Returns:
- The XML representation of this element. Never
null.
-
getClone
- Specified by:
getClonein interfacecom.helger.commons.lang.ICloneable<PSNS>
-
toString
-
ofPrefixAndUri
Factory method to create a newPSNSwith certain "prefix" and "uri" values- Parameters:
sUri-sPrefix- The namespace prefix to use. May benull.sUri- The namespace URI. May benull.- Returns:
- Never
null. - Since:
- 6.2.3
-