Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

resourceOnly variant plus validating example document #30

Merged
merged 6 commits into from
Feb 6, 2018
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
2 changes: 1 addition & 1 deletion v2/2_1_1/schemas/dbl-xhtml.rnc
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# dbl-xhtml.rnc v2.1.1
# Generated by mark@notamacbook using makeRNC.py
# Generated Tue Jan 30 16:46:24 2018
# Generated Tue Feb 6 19:20:05 2018

# Standalone xhtml schema

Expand Down
2 changes: 1 addition & 1 deletion v2/2_1_1/schemas/dbl-xhtml.rng
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<!--
dbl-xhtml.rnc v2.1.1
Generated by mark@notamacbook using makeRNC.py
Generated Tue Jan 30 16:46:24 2018
Generated Tue Feb 6 19:20:05 2018
-->
<!-- Standalone xhtml schema -->
<start>
Expand Down
2 changes: 1 addition & 1 deletion v2/2_1_1/schemas/dbl-xhtml.xsd
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<!--
dbl-xhtml.rnc v2.1.1
Generated by mark@notamacbook using makeRNC.py
Generated Tue Jan 30 16:46:24 2018
Generated Tue Feb 6 19:20:05 2018
-->
<!-- Standalone xhtml schema -->
<!-- html -->
Expand Down
97 changes: 89 additions & 8 deletions v2/2_1_1/schemas/job-spec-upload.rnc
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# job-spec-upload.rnc v2.1.1
# Generated by mark@notamacbook using makeRNC.py
# Generated Tue Jan 30 16:46:24 2018
# Generated Tue Feb 6 19:20:05 2018

# job specification

Expand All @@ -17,7 +17,7 @@ start = element job-request {

# Document types

dblMetadataElement = (translationMetadata | expressionMetadata | translationAndExpressionMetadata)
dblMetadataElement = (translationMetadata | expressionMetadata | translationAndExpressionMetadata | paratextZipResourceMetadata)

translationMetadata = textTranslationMetadata | audioTranslationMetadata | videoTranslationMetadata

Expand Down Expand Up @@ -124,6 +124,20 @@ videoTranslationAndExpressionMetadata = element DBLMetadata {
videoFormatElement
}

paratextZipResourceMetadata = element DBLMetadata {
dblMetadataCommonAtts &
paratextZipResourceIdentificationElement &
paratextZipResourceTypeElement &
relationshipsElement &
paratextZipResourceAgenciesElement &
shortLanguageElement &
translationManifestElement &
paratextZipResourceSourceElement &
paratextZipResourcePublicationsElement &
copyrightElement &
archiveStatusElement
}

translationCommonElements = (
commonElements &
translationManifestElement &
Expand Down Expand Up @@ -202,9 +216,19 @@ identificationElement =
element descriptionLocal { lenGe2String }? &
element scope { scopeEnum } &
canonSpecElement? &
element dateCompleted { dateCompletedValue }? &
(gbcSystemId | reapSystemId | biblicaSystemId | tmsSystemId | ptregSystemId | dbpSystemId)* &
element bundleProducer { lenGe2String }
}

paratextZipResourceIdentificationElement =
element identification {
element name { lenGe2String } &
element nameLocal { lenGe2String }? &
element abbreviation { abbreviationString } &
element abbreviationLocal { localAbbreviationString }? &
element dateCompleted { dateCompletedValue }? &
(gbcSystemId | ptSystemId | reapSystemId | biblicaSystemId | tmsSystemId | ptregSystemId)* &
(ptSystemId | gbcSystemId | reapSystemId | biblicaSystemId | tmsSystemId | ptregSystemId | dbpSystemId)* &
element bundleProducer { lenGe2String }
}

Expand All @@ -218,9 +242,8 @@ textIdentificationElement =
element descriptionLocal { lenGe2String }? &
element scope { scopeEnum } &
canonSpecElement? &

element dateCompleted { dateCompletedValue }? &
(gbcSystemId | ptSystemId | reapSystemId | biblicaSystemId | tmsSystemId | ptregSystemId | dbpSystemId)* &
(ptSystemId | gbcSystemId | reapSystemId | biblicaSystemId | tmsSystemId | ptregSystemId | dbpSystemId)* &
element bundleProducer { lenGe2String }
}

Expand Down Expand Up @@ -262,7 +285,11 @@ ptElements =
element name { lenGe2String } &
element fullName { lenGe2String } &
element csetId { lenGe2String }? &
element id { ptId }
element id { ptId } &
(
element baseId { ptId } &
element baseName { lenGe2String }
)?

ptregElements =
element id { ptregId }
Expand Down Expand Up @@ -426,6 +453,13 @@ agenciesElement =
contributorElement+
}

paratextZipResourceAgenciesElement =
element agencies {
rightsHolderElement+ &
rightsAdminElement? &
contributorElement?
}

rightsHolderElement =
element rightsHolder {
element abbr { lenGe2String } &
Expand Down Expand Up @@ -826,6 +860,16 @@ videoTranslationAndExpressionTypeElement =
element isConfidential { xsd:boolean }
}

paratextZipResourceTypeElement =
element type {
element medium { "paratextZipResource" } &
element hasCharacters { "true" } &
element isTranslation { "false" } &
element isExpression { "false" } &
element isConfidential { xsd:boolean } &
element projectType { paratextZipResourceProjectType }
}

commonTextTranslationTypeElements = (
commonTranslationTypeElements
)
Expand Down Expand Up @@ -885,6 +929,20 @@ translationLevelEnum = (
"Children"
)

paratextZipResourceProjectType = (
"Standard" |
"Daughter" |
"StudyBible" |
"StudyBibleAdditions" |
"BackTranslation" |
"Auxiliary" |
"TransliterationManual"|
"TransliterationWithEncoder" |
"ConsultantNotes" |
"GlobalConsultantNotes" |
"GlobalAnthropologyNotes"
)

# format

textFormatElement =
Expand Down Expand Up @@ -1071,6 +1129,11 @@ translationSourceElement =
( element canonicalContent { canonicalContentBook+} & element structure { (sourceStructureDivision | sourceStructureContent)+ } )
}

paratextZipResourceSourceElement =
element source {
element structure { (sourceStructureDivision | sourceStructureContent)+ }
}

sourceStructureDivision =
element division {
attribute name {nameIdString},
Expand All @@ -1089,18 +1152,30 @@ sourceStructureContent =

srcPathString = xsd:string { pattern = "[A-Za-z0-9][\-A-Za-z0-9_\.]+(/[A-Za-z0-9][\-A-Za-z0-9_\.]+)*" }

srcPathPartString = xsd:string { pattern = "(((zip|xpath)://)|#).+" }

# publications

publicationsElement = # DCMI: tableOfContents
element publications { publicationElement+ }

paratextZipResourcePublicationsElement =
element publications { paratextZipResourcePublicationElement+ }

publicationElement =
element publication {
attribute id { publicationId },
attribute default { xsd:boolean }?,
publicationChildElements
}

paratextZipResourcePublicationElement =
element publication {
attribute id { publicationId },
attribute default { xsd:boolean }?,
paratextZipResourcePublicationChildElements
}

publicationChildElements = (
element name { lenGe2String }? &
element nameLocal { lenGe2String }? &
Expand All @@ -1114,6 +1189,11 @@ publicationChildElements = (
element canonicalContent { canonicalContentBook+} &
element structure { (publicationStructureDivision | publicationStructureContent)+ }
)
paratextZipResourcePublicationChildElements = (
element name { lenGe2String }? &
element nameLocal { lenGe2String }? &
element structure { (publicationStructureDivision | publicationStructureContent)+ }
)

publicationCountriesElement = element countries { countryElement+ }

Expand All @@ -1133,12 +1213,13 @@ publicationStructureContent =
element content {
attribute name {nameIdString}? &
attribute src {srcPathString} &
attribute role {roleId}?
attribute role {roleId}? &
attribute srcPart {srcPathPartString}?
}

# publications text

roleId = ptReference | knownRole | extensionRole
roleId = ptReference | nonCanonicalBookIdEnum | knownRole | extensionRole

ptReference = xsd:string { pattern = "((GEN|EXO|LEV|NUM|DEU|JOS|JDG|RUT|1SA|2SA|1KI|2KI|1CH|2CH|EZR|NEH|EST|JOB|PSA|PRO|ECC|SNG|ISA|JER|LAM|EZK|DAN|HOS|JOL|AMO|OBA|JON|MIC|NAM|HAB|ZEP|HAG|ZEC|MAL|MAT|MRK|LUK|JHN|ACT|ROM|1CO|2CO|GAL|EPH|PHP|COL|1TH|2TH|1TI|2TI|TIT|PHM|HEB|JAS|1PE|2PE|1JN|2JN|3JN|JUD|REV|TOB|JDT|ESG|WIS|SIR|BAR|LJE|S3Y|SUS|BEL|1MA|2MA|3MA|4MA|1ES|2ES|MAN|PS2|ODA|PSS|JSA|JDB|TBS|SST|DNT|BLT|EZA|5EZ|6EZ|DAG|PS3|2BA|LBA|JUB|ENO|1MQ|2MQ|3MQ|REP|4BA|LAO)(( [1-9][0-9]{0,2}(-[1-9][0-9]{0,2})?((,([1-9][0-9]{0,2}(-[1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