Skip to content

Commit

Permalink
Merge branch 'maven-updates-saxon95' of https://github.com/sharwell/x…
Browse files Browse the repository at this point in the history
…mlcalabash1 into sharwell-maven-updates-saxon95
  • Loading branch information
ndw committed Sep 20, 2013
2 parents 2df38c9 + 02aea10 commit 05f3f42
Show file tree
Hide file tree
Showing 3 changed files with 250 additions and 27 deletions.
263 changes: 246 additions & 17 deletions pom.xml
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -7,13 +7,27 @@
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>


<groupId>com.xmlcalabash</groupId> <groupId>com.xmlcalabash</groupId>
<artifactId>xmlcalabash</artifactId> <artifactId>xmlcalabash-saxon95</artifactId>
<version>@version@</version> <version>1.0.14-SNAPSHOT</version>
<name>XML Calabash</name> <name>XML Calabash</name>
<description>XML Calabash - an implementation of XProc: An XML Pipeline Language</description> <description>XML Calabash - an implementation of XProc: An XML Pipeline Language</description>
<url>http://xmlcalabash.com/</url> <url>http://xmlcalabash.com/</url>
<packaging>jar</packaging> <packaging>jar</packaging>


<parent>
<groupId>org.sonatype.oss</groupId>
<artifactId>oss-parent</artifactId>
<version>7</version>
</parent>

<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<java6.home>${env.JAVA6_HOME}</java6.home>
<bootclasspath.java6>${java6.home}/lib/rt.jar;${java6.home}/lib/jce.jar</bootclasspath.java6>
<bootclasspath.compile>${bootclasspath.java6}</bootclasspath.compile>
<bootclasspath.testCompile>${bootclasspath.java6}</bootclasspath.testCompile>
</properties>

<developers> <developers>
<developer> <developer>
<name>Norman Walsh</name> <name>Norman Walsh</name>
Expand All @@ -32,9 +46,15 @@
</license> </license>
</licenses> </licenses>


<issueManagement>
<system>GitHub Issues</system>
<url>https://github.com/ndw/xmlcalabash1/issues</url>
</issueManagement>

<scm> <scm>
<connection>scm:git:git@github.com:ndw/xmlcalabash1.git</connection>
<url>https://github.com/ndw/xmlcalabash1.git</url> <url>https://github.com/ndw/xmlcalabash1.git</url>
<connection>scm:git:git://github.com/ndw/xmlcalabash1.git</connection>
<developerConnection>scm:git:git@github.com:ndw/xmlcalabash1.git</developerConnection>
</scm> </scm>


<dependencies> <dependencies>
Expand All @@ -56,7 +76,7 @@
<dependency> <dependency>
<groupId>net.sf.saxon</groupId> <groupId>net.sf.saxon</groupId>
<artifactId>Saxon-HE</artifactId> <artifactId>Saxon-HE</artifactId>
<version>@saxon-version@</version> <version>9.5.1-1</version>
</dependency> </dependency>


<!-- No need to specify commons-logging or commons-codec - they're transitive dependencies of httpclient --> <!-- No need to specify commons-logging or commons-codec - they're transitive dependencies of httpclient -->
Expand Down Expand Up @@ -111,18 +131,227 @@
<optional>true</optional><!-- used in the cxu:compare extension --> <optional>true</optional><!-- used in the cxu:compare extension -->
</dependency> </dependency>


<dependency>
<groupId>org.apache.ant</groupId>
<artifactId>ant</artifactId>
<version>1.9.2</version>
</dependency>

<dependency>
<groupId>net.java.dev.msv</groupId>
<artifactId>msv-core</artifactId>
<version>2013.6.1</version>
</dependency>

<!-- Dependencies for optional features are marked as optional -->
<dependency>
<groupId>com.drewnoakes</groupId>
<artifactId>metadata-extractor</artifactId>
<version>2.6.2</version>
<scope>compile</scope>
<optional>true</optional>
</dependency>

<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.10</version>
<scope>compile</scope>
<optional>true</optional>
</dependency>

<!-- <dependency>-->
<!-- <groupId>com.marklogic</groupId>-->
<!-- <artifactId>marklogic-xcc</artifactId>-->
<!-- <version>6.0.3</version>-->
<!-- <scope>compile</scope>-->
<!-- <optional>true</optional>-->
<!-- </dependency>-->

<dependency>
<groupId>org.apache.xmlgraphics</groupId>
<artifactId>fop</artifactId>
<version>1.1</version>
<scope>compile</scope>
<optional>true</optional>
</dependency>

<dependency>
<artifactId>avalon-framework-api</artifactId>
<groupId>org.apache.avalon.framework</groupId>
<version>4.3.1</version>
<scope>compile</scope>
<optional>true</optional>
</dependency>

<dependency>
<artifactId>avalon-framework-impl</artifactId>
<groupId>org.apache.avalon.framework</groupId>
<type>jar</type>
<version>4.3.1</version>
<scope>compile</scope>
<optional>true</optional>
</dependency>
</dependencies> </dependencies>


<distributionManagement> <profiles>
<snapshotRepository> <profile>
<id>sonatype-nexus-snapshots</id> <id>sonatype-oss-release</id>
<name>Sonatype Nexus Snapshots</name> <build>
<url>https://oss.sonatype.org/content/repositories/snapshots/</url> <plugins>
</snapshotRepository> <plugin>
<repository> <groupId>org.apache.maven.plugins</groupId>
<id>sonatype-nexus-staging</id> <artifactId>maven-compiler-plugin</artifactId>
<name>Nexus Release Repository</name> <executions>
<url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url> <execution>
</repository> <id>default-compile</id>
</distributionManagement> <configuration>
</project> <compilerArguments>
<bootclasspath>${bootclasspath.compile}</bootclasspath>
</compilerArguments>
</configuration>
</execution>
<execution>
<id>default-testCompile</id>
<configuration>
<compilerArguments>
<bootclasspath>${bootclasspath.testCompile}</bootclasspath>
</compilerArguments>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
</profiles>

<build>
<defaultGoal>install</defaultGoal>

<sourceDirectory>src</sourceDirectory>
<resources>
<resource>
<directory>resources</directory>
</resource>
</resources>

<testSourceDirectory>test</testSourceDirectory>
<testResources>
<testResource>
<directory>test</directory>
</testResource>
</testResources>

<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<version>2.4</version>
<configuration>
<archive>
<manifest>
<addDefaultImplementationEntries>true</addDefaultImplementationEntries>
</manifest>
</archive>
</configuration>
</plugin>

<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.1</version>

<executions>
<execution>
<id>default-compile</id>
<configuration>
<showWarnings>true</showWarnings>
<showDeprecation>true</showDeprecation>
<compilerArgument>-Xlint:-serial</compilerArgument>
<compilerArguments>
<Xlint/>
</compilerArguments>
<source>1.6</source>
<target>1.6</target>

<excludes>
<!-- Requires Delta XML Core (not available through Maven) -->
<exclude>com/xmlcalabash/extensions/DeltaXML.java</exclude>

<!-- Requires RenderX XEP (non-public) -->
<exclude>com/xmlcalabash/util/FoXEP.java</exclude>

<!-- Requires Antenna House Formatter (non-public) -->
<exclude>com/xmlcalabash/util/FoAH.java</exclude>
<exclude>com/xmlcalabash/util/CssAH.java</exclude>

<!-- Requires Prince XML (non-public) -->
<exclude>com/xmlcalabash/util/CssPrince.java</exclude>

<!-- Requires MarkLogic XCC (non-public) -->
<exclude>com/xmlcalabash/extensions/marklogic/XCCAdhocQuery.java</exclude>
<exclude>com/xmlcalabash/extensions/marklogic/XCCInsertDocument.java</exclude>
<exclude>com/xmlcalabash/extensions/marklogic/XCCInvokeModule.java</exclude>
</excludes>
</configuration>
</execution>

<execution>
<id>default-testCompile</id>
<configuration>
<showWarnings>true</showWarnings>
<showDeprecation>true</showDeprecation>
<compilerArgument>-Xlint:-serial</compilerArgument>
<compilerArguments>
<Xlint/>
</compilerArguments>
<source>1.6</source>
<target>1.6</target>
</configuration>
</execution>
</executions>
</plugin>

<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.16</version>
</plugin>

<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>findbugs-maven-plugin</artifactId>
<version>2.5.2</version>
<configuration>
<findbugsXmlOutput>true</findbugsXmlOutput>
<xmlOutput>true</xmlOutput>
</configuration>
</plugin>

<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
<!-- override the version inherited from the parent -->
<version>2.2.1</version>
</plugin>

<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<!-- override the version inherited from the parent -->
<version>2.9.1</version>
<configuration>
<quiet>true</quiet>
</configuration>
</plugin>

<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-gpg-plugin</artifactId>
<!-- override the version inherited from the parent -->
<version>1.4</version>
</plugin>
</plugins>
</build>
</project>
12 changes: 3 additions & 9 deletions src/com/xmlcalabash/extensions/MetadataExtractor.java
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
import com.drew.imaging.jpeg.JpegProcessingException; import com.drew.imaging.jpeg.JpegProcessingException;
import com.drew.metadata.Directory; import com.drew.metadata.Directory;
import com.drew.metadata.Metadata; import com.drew.metadata.Metadata;
import com.drew.metadata.MetadataException;
import com.drew.metadata.Tag; import com.drew.metadata.Tag;
import com.xmlcalabash.core.XProcConstants; import com.xmlcalabash.core.XProcConstants;
import com.xmlcalabash.core.XProcException; import com.xmlcalabash.core.XProcException;
Expand Down Expand Up @@ -82,11 +81,11 @@ public void run() throws SaxonApiException {
tree.startContent(); tree.startContent();


// iterate through metadata directories // iterate through metadata directories
Iterator directories = metadata.getDirectoryIterator(); Iterator directories = metadata.getDirectories().iterator();
while (directories.hasNext()) { while (directories.hasNext()) {
Directory directory = (Directory) directories.next(); Directory directory = (Directory) directories.next();
String dir = directory.getName(); String dir = directory.getName();
Iterator tags = directory.getTagIterator(); Iterator tags = directory.getTags().iterator();
while (tags.hasNext()) { while (tags.hasNext()) {
Tag tag = (Tag) tags.next(); Tag tag = (Tag) tags.next();


Expand All @@ -95,12 +94,7 @@ public void run() throws SaxonApiException {
tree.addAttribute(_type, tag.getTagTypeHex()); tree.addAttribute(_type, tag.getTagTypeHex());
tree.addAttribute(_name, tag.getTagName()); tree.addAttribute(_name, tag.getTagName());


String value = ""; String value = tag.getDescription();
try {
value = tag.getDescription();
} catch (MetadataException me) {
tree.addAttribute(_error, me.toString());
}


// Bah humbug...I don't see an easy way to tell if ti's a date/time // Bah humbug...I don't see an easy way to tell if ti's a date/time
if (value.matches("^\\d\\d\\d\\d:\\d\\d:\\d\\d \\d\\d:\\d\\d:\\d\\d$")) { if (value.matches("^\\d\\d\\d\\d:\\d\\d:\\d\\d \\d\\d:\\d\\d:\\d\\d$")) {
Expand Down
2 changes: 1 addition & 1 deletion src/com/xmlcalabash/model/Parser.java
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -58,9 +58,9 @@ public class Parser {
private static QName px_name = new QName(XProcConstants.NS_CALABASH_EX,"name"); private static QName px_name = new QName(XProcConstants.NS_CALABASH_EX,"name");
private static QName _name = new QName("name"); private static QName _name = new QName("name");
private static QName _href = new QName("href"); private static QName _href = new QName("href");
private static QName _namespace = new QName("namespace");
private static QName _type = new QName("type"); private static QName _type = new QName("type");
private static QName _version = new QName("version"); private static QName _version = new QName("version");
private static QName _namespace = new QName("namespace");
private static QName err_XS0063 = new QName(XProcConstants.NS_XPROC_ERROR, "XS0063"); private static QName err_XS0063 = new QName(XProcConstants.NS_XPROC_ERROR, "XS0063");
private static QName p_use_when = new QName(XProcConstants.NS_XPROC, "use-when"); private static QName p_use_when = new QName(XProcConstants.NS_XPROC, "use-when");
private static QName _use_when = new QName("use-when"); private static QName _use_when = new QName("use-when");
Expand Down

0 comments on commit 05f3f42

Please sign in to comment.