Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Asger Askov Blekinge
committed
May 14, 2012
1 parent
ec94b60
commit e47c60b
Showing
14 changed files
with
121 additions
and
27 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> | ||
<modelVersion>4.0.0</modelVersion> | ||
|
||
<parent> | ||
<groupId>dk.statsbiblioteket.sbprojects</groupId> | ||
<artifactId>sbprojects-parent</artifactId> | ||
<version>3</version> | ||
</parent> | ||
|
||
<groupId>dk.statsbiblioteket.mediespring</groupId> | ||
<artifactId>SB-yousee-profile-validation</artifactId> | ||
<version>0.1-SNAPSHOT</version> | ||
<packaging>pom</packaging> | ||
|
||
<scm> | ||
<connection>scm:git:git://github.com/statsbiblioteket/SB-yousee-workflow.git</connection> | ||
<url>scm:git:git://github.com/statsbiblioteket:SB-yousee-workflow.git</url> | ||
<developerConnection>scm:git:git://github.com/statsbiblioteket/SB-yousee-workflow.git</developerConnection> | ||
</scm> | ||
|
||
<repositories> | ||
<repository> | ||
<id>sbprojects-nexus</id> | ||
<url>https://sbprojects.statsbiblioteket.dk/nexus/content/groups/public</url> | ||
<releases> | ||
<enabled>true</enabled> | ||
</releases> | ||
<snapshots> | ||
<enabled>true</enabled> | ||
</snapshots> | ||
</repository> | ||
</repositories> | ||
|
||
|
||
<build> | ||
<plugins> | ||
|
||
<plugin> | ||
<artifactId>maven-assembly-plugin</artifactId> | ||
<version>2.2-beta-5</version> | ||
<configuration> | ||
<descriptors> | ||
<descriptor>src/main/assembly/assembly.xml</descriptor> | ||
</descriptors> | ||
<attach>true</attach> | ||
</configuration> | ||
<executions> | ||
<execution> | ||
<id>make-assembly</id> | ||
<phase>package</phase> | ||
<goals> | ||
<goal>single</goal> | ||
</goals> | ||
</execution> | ||
</executions> | ||
</plugin> | ||
|
||
</plugins> | ||
</build> | ||
</project> | ||
|
This file was deleted.
Oops, something went wrong.
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,21 @@ | ||
<assembly> | ||
|
||
<formats> | ||
<format>zip</format> | ||
</formats> | ||
<includeBaseDirectory>false</includeBaseDirectory> | ||
<fileSets> | ||
|
||
|
||
<fileSet> | ||
<outputDirectory></outputDirectory> | ||
<directory>src/main/profileValidator</directory> | ||
</fileSet> | ||
|
||
</fileSets> | ||
|
||
|
||
|
||
</assembly> | ||
|
||
|
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
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,38 @@ | ||
#!/bin/bash | ||
|
||
XML=$1 | ||
PROFILE=$2 | ||
|
||
pushd . > /dev/null | ||
SCRIPT_PATH="${BASH_SOURCE[0]}"; | ||
if ([ -h "${SCRIPT_PATH}" ]) then | ||
while([ -h "${SCRIPT_PATH}" ]) do cd `dirname "$SCRIPT_PATH"`; SCRIPT_PATH=`readlink "${SCRIPT_PATH}"`; done | ||
fi | ||
cd `dirname ${SCRIPT_PATH}` > /dev/null | ||
SCRIPT_PATH=`pwd`; | ||
popd > /dev/null | ||
|
||
|
||
|
||
TEMPDIR=`mktemp -d` | ||
|
||
#transform the profile to xslt | ||
xsltproc -o $TEMPDIR/step1.xsl $SCRIPT_PATH/schematron/iso_dsdl_include.xsl $PROFILE | ||
xsltproc -o $TEMPDIR/step2.xsl $SCRIPT_PATH/schematron/iso_abstract_expand.xsl $TEMPDIR/step1.xsl | ||
xsltproc -o $TEMPDIR/step3.xsl $SCRIPT_PATH/schematron/iso_schematron_message.xsl $TEMPDIR/step2.xsl | ||
|
||
#evaluate the profile | ||
xsltproc $TEMPDIR/step3.xsl $XML 2> $TEMPDIR/result.xml | ||
|
||
|
||
if [ -s $TEMPDIR/result.xml ]; then | ||
cat $TEMPDIR/result.xml | ||
rm -r $TEMPDIR | ||
else | ||
echo "{" | ||
echo "\"valid\" : true" | ||
echo "}" | ||
rm -r $TEMPDIR | ||
fi | ||
|
||
|