Skip to content

Commit

Permalink
TIKA-2989 -- add xml root detection for .xdp
Browse files Browse the repository at this point in the history
  • Loading branch information
tballison committed Nov 19, 2019
1 parent cacfe64 commit 9800dac
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -982,6 +982,8 @@
<glob pattern="*.aet"/>
</mime-type>
<mime-type type="application/vnd.adobe.xdp+xml">
<sub-class-of type="application/xml"/>
<root-XML localName="xdp" namespaceURI="http://ns.adobe.com/xdp/" />
<glob pattern="*.xdp"/>
</mime-type>
<mime-type type="application/vnd.adobe.xfdf">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -187,6 +187,12 @@ public void testDigiliteFDF() throws Exception {
"testDigilite.fdf");
}

@Test
public void testXDP() throws Exception {
assertTypeDetection("testXDP.xdp",
"application/vnd.adobe.xdp+xml");
}

@Test
public void testHFATypes() throws Exception {
assertTypeByData("application/x-erdas-hfa","testHFA.hfa");
Expand Down
5 changes: 5 additions & 0 deletions tika-parsers/src/test/resources/test-documents/testXDP.xdp
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<?xfa generator="XFA2_0" APIVersion="1.4.3062.0"?>
<xdp:xdp xmlns:xdp="http://ns.adobe.com/xdp/">
<config xmlns="http://www.xfa.org/schema/xci/1.0/" xmlns:xfa="http://www.xfa.org/schema/xci/1.0/"
></config></xdp:xdp>

0 comments on commit 9800dac

Please sign in to comment.