OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

dita-comment message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]


Subject: initial release of DITA-plugin-utilities


Hi all,

 

In an effort to encourage the use of DITA specialization, I released two utilities to create and report DITA grammar modules:

 

https://github.com/chrispy-snps/DITA-plugin-utilities

 

There are two linux-based utilities provided:

 

  • make_dita_grammar.pl - make DITA RelaxNG grammar plugin modules from high-level descriptions
  • content_model.pl - show the content model of a DITA RelaxNG topicshell or mapshell module

 

make_dita_grammar.pl lets you create DITA grammars from high-level XML descriptions. For example,

 

<specialize elements="fig1" from="fig"/>

 

The output is a plugin directory that is ready to be placed in your DITA-OT plugins/ directory and installed/integrated.

 

content_model.pl lets you report the content model of DITA topicshell and mapshell modules:

 

$ content_model.pl ex1/rng/myTopicShell.rng -attributes none

abstract = element abstract { (text | dl | \div | fig | fig1 | image | lines | lq | note | object | ol | p | pre | simpletable | sl | table | ul | boolean | cite | keyword | ph | q | term | \text | tm | xref | state | data | data-about | foreign | unknown | shortdesc | draft-comment | fn | indextermref | indexterm | r

equired-cleanup)+ }

alt = element alt { (text | data | data-about | foreign | unknown | keyword | term | \text | draft-comment | required-cleanup | ph)+ }

audience = element audience { empty }

author = element author { (text | data | data-about | foreign | unknown | keyword | term | \text)+ }

body = element body { (dl | \div | fig | fig1 | image | lines | lq | note | object | ol | p | pre | simpletable | sl | table | ul | data | data-about | draft-comment | foreign | unknown | required-cleanup | bodydiv | example | section)* }

...omitted...

topic = element topic { title, titlealts?, (shortdesc | abstract)?, prolog?, body?, related-links?, topic* }

ul = element ul { (data | data-about)*, li+ }

unknown = element unknown { (topic? | _1 | text)+ }

vrm = element vrm { empty }

vrmlist = element vrmlist { vrm+ }

xref = element xref { (text | boolean | keyword | ph | q | term | \text | tm | state | cite | data | data-about | draft-comment | foreign | unknown | required-cleanup | image | desc)+ }

 

Together, the utilities allow you to get into a very tight loop of writing high-level grammar descriptions in one window, and viewing the content models of the actual DITA plugin you’ve created in the other.

 

I posted more examples of both utilities here:

 

https://groups.yahoo.com/neo/groups/dita-users/conversations/topics/44750

 

and there are some examples of input XML files and the generated output plugin files in the Git repo at

 

https://github.com/chrispy-snps/DITA-plugin-utilities/tree/master/examples

 

This is an initial release, so expect bugs and rough edges. But, it's working enough that we're using it in-house for grammar creation. I am hoping that this could be a game-changer in how DITA is used. Please feel free to ask questions.

 

-----
Chris Papademetrious

Tech Writer, Implementation Group

(610) 628-9718 home office

(570) 460-6078 cell

 



[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]