-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- blank namespace prefixes are now reported as `<no-prefix>` in the `DOC-8` message`; - altered the `DOC-8` message to emphasise that prefixes are reported; - refactored out collection of namespaces into a Uitls class; and - removed trailing newline from `README` and template.
- Loading branch information
1 parent
f04a783
commit 923a725
Showing
6 changed files
with
23 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
18 changes: 18 additions & 0 deletions
18
odf-core/src/main/java/org/openpreservation/odf/validation/Utils.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
package org.openpreservation.odf.validation; | ||
|
||
import java.util.Set; | ||
import java.util.stream.Collectors; | ||
|
||
import org.openpreservation.format.xml.Namespace; | ||
|
||
class Utils { | ||
private Utils() { | ||
throw new UnsupportedOperationException("Utility class"); | ||
} | ||
|
||
public static String collectNsPrefixes(final Set<Namespace> namespaces) { | ||
return namespaces.stream().map(Namespace::getPrefix).map(s -> { | ||
return s.isEmpty() ? "<no-prefix>" : s; | ||
}).collect(Collectors.joining()); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters