Skip to content

Commit

Permalink
Merge pull request #906 from openpreserve/david-russo-schemalocation-…
Browse files Browse the repository at this point in the history
…whitespace-fix

FIX: XML schema integration tests.
  • Loading branch information
carlwilson authored Mar 4, 2024
2 parents a98012a + fcfba6e commit 913b36c
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
5 changes: 5 additions & 0 deletions jhove-bbt/scripts/create-1.29-target.sh
Original file line number Diff line number Diff line change
Expand Up @@ -58,3 +58,8 @@ cp -R "${baselineRoot}" "${targetRoot}"

# Update release details for ePub module
find "${targetRoot}" -type f -name "audit.jhove.xml" -exec sed -i 's/^ <module release="1.2">EPUB-ptc<\/module>$/ <module release="1.3">EPUB-ptc<\/module>/' {} \;

# Copy the XML file output changed by https://github.com/openpreserve/jhove/pull/889
if [[ -f "${candidateRoot}/examples/modules/XML-hul/jhoveconf.xml.jhove.xml" ]]; then
cp "${candidateRoot}/examples/modules/XML-hul/jhoveconf.xml.jhove.xml" "${targetRoot}/examples/modules/XML-hul/jhoveconf.xml.jhove.xml"
fi
Original file line number Diff line number Diff line change
Expand Up @@ -189,12 +189,12 @@ public void startElement(String namespaceURI, String localName,
// and location URIs separated by white space. Any
// number of such pairs may be declared in a single
// schemaLocation attribute.
String[] uris = val.split("\\s");
String[] uris = val.trim().split("\\s+");
for (int j = 0; j < uris.length; j += 2) {
SchemaInfo schema = new SchemaInfo();
schema.namespaceURI = uris[j].trim();
schema.namespaceURI = uris[j];
if (uris.length > j + 1) {
schema.location = uris[j + 1].trim();
schema.location = uris[j + 1];
} else {
schema.location = "";
}
Expand Down

0 comments on commit 913b36c

Please sign in to comment.