Skip to content
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
26 changes: 25 additions & 1 deletion RelaxNG/document-pdf-ua1.rnc
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,12 @@ namespace Table = "http://iso.org/pdf/ssn/Table"
namespace List = "http://iso.org/pdf/ssn/List"
namespace Artifact = "http://iso.org/pdf/ssn/Artifact"

# XMP
namespace x = "adobe:ns:meta/"
namespace rdf = "http://www.w3.org/1999/02/22-rdf-syntax-ns#"
namespace dc = "http://purl.org/dc/elements/1.1/"
namespace pdfuaid = "http://www.aiim.org/pdfua/ns/id/"

# XHTML Namespace, not currently used
namespace h = "http://www.w3.org/1999/xhtml"

Expand Down Expand Up @@ -40,7 +46,8 @@ pdf1rolemap-Note = attribute rolemaps-to {"Note"}
# UA-1 does not force a single document element.
start = PDF

PDF = element NoNS:PDF {StructTreeRoot}
PDF = element NoNS:PDF {StructTreeRoot,XMP?}

StructTreeRoot = element NoNS:StructTreeRoot {( Document|DocumentFragment|Part|Art|Div|Sect|TOC|Aside|BlockQuote|NonStruct|Private|P|Note|Code|Hn|H|Title|Link|Annot|Form|FENote|Index|L|Table|Figure|Formula|Artifact)*}

AssociatedFile = element NoNS:AssociatedFile {
Expand All @@ -62,8 +69,24 @@ formula-requirements = (
attribute alt {text}
)

## PDF/UA-1
pdfuaid_part = element pdfuaid:part {"1"}

## share with pdf1.7 version from here to end

# XMP data
anyelem = element * {(attribute * {text}* | text | anyelem) *}

XMP = element NoNS:XMP {x_xmpmeta & anyelem*}

x_xmpmeta = element x:xmpmeta {attribute * {text}*,(rdf_RDF & anyelem*)}

rdf_RDF= element rdf:RDF {attribute * {text}*, (rdf_Description & anyelem*)}

rdf_Description= element rdf:Description {attribute * {text}*, (pdfuaid_part & anyelem*)}

# end of XMP

textorHTML &= (Link|Reference|Strong|Code|Em|Lbl|Span|mathse|Quote|RB|Annot|Figure|Form)*

MathMLPGlobalAttributes &= showtags-attributes
Expand Down Expand Up @@ -602,3 +625,4 @@ pdf2-attributes,
(text|NonStruct|Private|Note|Code|Sub|Lbl|Em|Strong|Span|Quote|Link|Reference|Annot|Form|Ruby|Warichu|FENote|BibEntry|Figure|Formula|Artifact)*
}


Loading