Package org.apache.xml.resolver.helpers
Class PublicId
java.lang.Object
org.apache.xml.resolver.helpers.PublicId
Static methods for dealing with public identifiers.
This class defines a set of static methods that can be called to handle public identifiers.
- Version:
- 1.0
- Author:
- Norman Walsh Norman.Walsh@Sun.COM
-
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
PublicId
protected PublicId()
-
-
Method Details
-
normalize
Normalize a public identifier.Public identifiers must be normalized according to the following rules before comparisons between them can be made:
- Whitespace characters are normalized to spaces (e.g., line feeds, tabs, etc. become spaces).
- Leading and trailing whitespace is removed.
- Multiple internal whitespaces are normalized to a single space.
This method is declared static so that other classes can use it directly.
- Parameters:
publicId
- The unnormalized public identifier.- Returns:
- The normalized identifier.
-
encodeURN
Encode a public identifier as a "publicid" URN.This method is declared static so that other classes can use it directly.
- Parameters:
publicId
- The unnormalized public identifier.- Returns:
- The normalized identifier.
-
decodeURN
Decode a "publicid" URN into a public identifier.This method is declared static so that other classes can use it directly.
- Parameters:
urn
- The urn:publicid: URN- Returns:
- The normalized identifier.
-