Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FIX: XML schema integration tests. #906

Merged
merged 3 commits into from
Mar 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading