Created
December 17, 2023 17:04
-
-
Save edwintorok/c1dee6fdba1932312e38dcf8020050b5 to your computer and use it in GitHub Desktop.
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
#!/usr/bin/env bash | |
if [ "$1" != "" ]; then | |
unzip -o -j "$1" -d "./tmp" | |
xmllint --format "./tmp/document.xml" > "./tmp/document-pretty.xml" | |
xmllint --format "./tmp/styles.xml" > "./tmp/styles-pretty.xml" | |
xmllint --format "./tmp/settings.xml" > "./tmp/settings-pretty.xml" | |
fi | |
xmllint -noout -nonet -debugent \ | |
-schema "schemas/microsoft/wml-2010.xsd" \ | |
"./tmp/document-pretty.xml" 2>&1 | |
xmllint -noout -nonet \ | |
-schema "./schemas/microsoft/wml-2010.xsd" \ | |
"./tmp/styles-pretty.xml" 2>&1 | |
xmllint -noout -nonet \ | |
-schema "./schemas/microsoft/wml-2010.xsd" \ | |
"./tmp/settings-pretty.xml" 2>&1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment