Repurposing TEI DTD's
Having trouble installing Oxygen? Got a bug to report? Post it all here.
-
- Posts: 2
- Joined: Sat Sep 25, 2010 11:57 am
Repurposing TEI DTD's
Primary problem: Repurpose tei2.dtd for entity tei.verse in document structure dating from 1999, if possible.
<!DOCTYPE tei.2 system 'tei2.dtd' [
<!ENTITY % TEI.verse 'INCLUDE'>]>
<tei.2>
<teiheader>
Problem description: Prologue does not declare the character set, so a character set is assigned to the code points (ISO-IEC 8859-1). Prologue does declare DTD, but Author does not acknowledge the DTD and does not enable application UI e.g. for validation. Presumably one has to set up and save an external DTD to disk using TEI Pizza Chef, install that external DTD into Author, and associate the installed DTD with the document in order to enable validation and editing. If this strategy is correct, then how does one install and associate the DTD? The help information and the information in the manual is a tad high level.
Secondary problem: How would one install the MEI Music Encoding Initiave schema, and work successfully with it in Author? Anyone tried?
Platform: Mac OS X 10.4.11, Author 12
Best wishes,
Henrik Holmegaard
<!DOCTYPE tei.2 system 'tei2.dtd' [
<!ENTITY % TEI.verse 'INCLUDE'>]>
<tei.2>
<teiheader>
Problem description: Prologue does not declare the character set, so a character set is assigned to the code points (ISO-IEC 8859-1). Prologue does declare DTD, but Author does not acknowledge the DTD and does not enable application UI e.g. for validation. Presumably one has to set up and save an external DTD to disk using TEI Pizza Chef, install that external DTD into Author, and associate the installed DTD with the document in order to enable validation and editing. If this strategy is correct, then how does one install and associate the DTD? The help information and the information in the manual is a tad high level.
Secondary problem: How would one install the MEI Music Encoding Initiave schema, and work successfully with it in Author? Anyone tried?
Platform: Mac OS X 10.4.11, Author 12
Best wishes,
Henrik Holmegaard
-
- Posts: 4141
- Joined: Fri Mar 28, 2003 2:12 pm
Re: Repurposing TEI DTD's
Post by sorin_ristache »
Hello,
You don't have to create a custom TEI DTD using the Pizza Chef. You just have to enable the TEI.verse entity of the standard TEI DTD and use the correct element and attribute names in your XML document. If the TEI.verse entity is enabled the verse specific elements and attributes are recognized in the XML document, for example the caesura element:
The Author editing mode will match your XML document with the TEI P4 built-in document type because the match rules of that document type can be applied to the XML document. However the validation action uses the schema declared in the XML document type which means the TEI verse elements are accepted.
You can test that by removing and re-inserting the TEI.verse entity declaration and validating the XML document again after each step. Unfortunately the DTD declaration cannot be modified from Author mode so you have to switch to Text mode for that.
Regards,
Sorin
You don't have to create a custom TEI DTD using the Pizza Chef. You just have to enable the TEI.verse entity of the standard TEI DTD and use the correct element and attribute names in your XML document. If the TEI.verse entity is enabled the verse specific elements and attributes are recognized in the XML document, for example the caesura element:
Code: Select all
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE TEI.2 PUBLIC "-//TEI P4//DTD Main Document Type//EN" "http://www.tei-c.org/Guidelines/DTD/tei2.dtd" [
<!ENTITY % TEI.verse 'INCLUDE'>
<!ENTITY % TEI.prose 'INCLUDE'>
<!ENTITY % TEI.linking 'INCLUDE'>
<!ENTITY % TEI.XML 'INCLUDE'>
]>
<TEI.2>
<teiHeader>
<fileDesc>
<titleStmt>
<title/>
</titleStmt>
<publicationStmt>
<p>Publication statement goes here.</p>
</publicationStmt>
<sourceDesc>
<p>Source description goes here.</p>
</sourceDesc>
</fileDesc>
</teiHeader>
<text>
<body>
<head>Head text</head>
<lg type="free">
<l>example <caesura/> text</l>
</lg>
</body>
</text>
</TEI.2>
You can test that by removing and re-inserting the TEI.verse entity declaration and validating the XML document again after each step. Unfortunately the DTD declaration cannot be modified from Author mode so you have to switch to Text mode for that.
Regards,
Sorin
-
- Posts: 4141
- Joined: Fri Mar 28, 2003 2:12 pm
Re: Repurposing TEI DTD's
Post by sorin_ristache »
An example of a minimal MEI document is the following:/hh wrote:Secondary problem: How would one install the MEI Music Encoding Initiave schema, and work successfully with it in Author? Anyone tried?
Code: Select all
<?xml version= "1.0" encoding= "UTF-8" ?>
<?oxygen RNGSchema= "http://music-encoding.org/mei/schemata/2010-05/rng/mei-all.rng" type="xml"?>
<mei xmlns='http://www.music-encoding.org/ns/mei' >
<meihead>
<filedesc>
<titlestmt>
<title></title>
</titlestmt>
<pubstmt></pubstmt>
</filedesc>
</meihead>
<music>
</music>
</mei>
If you want to create a MEI document type in Oxygen based on the saved local schema files you have to go to menu Options -> Preferences -> Document Type Association, press the New button and follow the instructions for the example document type from the Oxygen Author User Manual (also included in the Oxygen Editor User Manual).
Regards,
Sorin
-
- Posts: 2
- Joined: Sat Sep 25, 2010 11:57 am
Re: Repurposing TEI DTD's
Sorin wrote:
>You don't have to create a custom TEI DTD using the Pizza Chef.
OK, so the subsets offered by the Pizza Chef are supported by the standard TEI DTD.
>You just have to enable the TEI.verse entity of the standard TEI DTD and use the correct element and attribute names in your XML document. If the TEI.verse entity is enabled the verse specific elements and attributes are recognized in the XML document
If the tags in an existing document have no defined syntax, and if as a symptom the software UI does not separate the tags from the text for processing purposes, the manual says (PDF edition page 39) "Go to menu Document > Schema > Associate Schema..." However, this dialogue is not available anywhere in the Document menu.
So far so good.
>Unfortunately the DTD declaration cannot be modified from Author mode so you have to switch to Text mode for that.
After 45min I haven't found a way to do that. How is it done?
Thanks in advance,
/hh
>You don't have to create a custom TEI DTD using the Pizza Chef.
OK, so the subsets offered by the Pizza Chef are supported by the standard TEI DTD.
>You just have to enable the TEI.verse entity of the standard TEI DTD and use the correct element and attribute names in your XML document. If the TEI.verse entity is enabled the verse specific elements and attributes are recognized in the XML document
If the tags in an existing document have no defined syntax, and if as a symptom the software UI does not separate the tags from the text for processing purposes, the manual says (PDF edition page 39) "Go to menu Document > Schema > Associate Schema..." However, this dialogue is not available anywhere in the Document menu.
So far so good.
>Unfortunately the DTD declaration cannot be modified from Author mode so you have to switch to Text mode for that.
After 45min I haven't found a way to do that. How is it done?
Thanks in advance,
/hh
-
- Posts: 4141
- Joined: Fri Mar 28, 2003 2:12 pm
Re: Repurposing TEI DTD's
Post by sorin_ristache »
If there is no schema declared explicitly in the XML document Oxygen will try to match one of the rules of the document types from the Preferences (menu Options -> Preferences -> Document Type Association) with the XML document. Only if no rule can be matched indeed we can say the syntax is not defined and you should run the Associate Schema action which is available on menu Document -> Schema./hh wrote:If the tags in an existing document have no defined syntax, and if as a symptom the software UI does not separate the tags from the text for processing purposes, the manual says (PDF edition page 39) "Go to menu Document > Schema > Associate Schema..." However, this dialogue is not available anywhere in the Document menu.
For example if you create an XML document with the above TEI P4 example that I posted it will be matched automatically with the TEI P4 document type which means the TEI P4 DTD will be used for validation and content completion in that document.
What does the action Validate Document say? Does it say that there is no schema associated with the document? Or does it say that the document does not follow the schema (which means a schema is associated with the document)?
In the left bottom corner of the editor panel there are 3 buttons: Text, Grid, Author. These buttons switch between the three editing modes of an XML document./hh wrote:>Unfortunately the DTD declaration cannot be modified from Author mode so you have to switch to Text mode for that.
After 45min I haven't found a way to do that. How is it done?
Regards,
Sorin
Jump to
- Oxygen XML Editor/Author/Developer
- ↳ Feature Request
- ↳ Common Problems
- ↳ DITA (Editing and Publishing DITA Content)
- ↳ SDK-API, Frameworks - Document Types
- ↳ DocBook
- ↳ TEI
- ↳ XHTML
- ↳ Other Issues
- Oxygen XML Web Author
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Content Fusion
- ↳ Feature Request
- ↳ Common Problems
- Oxygen JSON Editor
- ↳ Feature Request
- ↳ Common Problems
- Oxygen PDF Chemistry
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Feedback
- ↳ Feature Request
- ↳ Common Problems
- Oxygen XML WebHelp
- ↳ Feature Request
- ↳ Common Problems
- XML
- ↳ General XML Questions
- ↳ XSLT and FOP
- ↳ XML Schemas
- ↳ XQuery
- NVDL
- ↳ General NVDL Issues
- ↳ oNVDL Related Issues
- XML Services Market
- ↳ Offer a Service