30 (2013 ) DITA DITA(Darwin Information Typing Architecture) In software development processes, several documents are created in period of each development phases. Most of these have different file type and writing style for every projects. Thus if a documents created in a development phase are modified in later phases, developers spend time and efforts on keeping integrity and tracing to correspondence of all documents. This study proposes an environment for integrity and traceability of deliverables of each phases. As an approach of this proposal, the environment manages documents as serieses of reusable information with DITA (Darwin Information Typing Architecture). For correspondence of documents with source codes, the environment generates source codes from parts of documents which corresponds to program modules and traces changes with parse for source codes. 1 1. 1 Proposal of an Integrated Document Management Environment for Source Codes and Software Documents Using DITA. Shohei Kanaya Kei Ito Michiko Oba Taku Okuno,, Dept. of Systems Information Science Future University Hakodate. XML DITA(Darwin Information Typing Architecture) XML DITA
1. 2 DITA 2 2. 1 2. 1. 1 UModel UModel Altova [1] UModel UModel UML(Unified Modeling Language) Java C# VB.NET UML UModel UML 2. 1. 2 XML XML [7] chkspddoc chkspddoc CASE Sapid[8] Sapid XML Dapid Dapid XML Dapid Sapid Sapid C Java JavaScript JSP HTML Dapid Sapid 2. 2 2. 1. 2 XML 2. 3 XML XML XML XSL HTML PDF XML DITA DocBook
2. 3. 1 DocBook DocBook OASIS XML [5] RTF, man HTML 2. 3. 2 DITA DocBook OASIS XML DITA(Darwin Information Typing Architecture) [2] DITA DITA ( 1) DITA DITA DITA 2. 3. 3 DITA DITA [9] DITA 1 DITA 2007[6] 2007 2. 3. 4 DITA Open Toolkit DITA DITA HTML PDF DITA Open Toolkit( DITA-OT)[4] 2 A, B, C, D, E 1, 2 DITA-OT XSL
3. 2 2007[6] 2 DITA-OT 3 3. 1 3 DITA DITA id id id id 3. 3 2 XML XML XML DTD XML DITA DITA XML DITA 2. 3. 3 3. 4 3. 4. 1 DITA-OT DITA-OT DITA
3 1 // #i d=m0001 p u b l i c s t a t i c void main ( S t r i n g [ ] a r g s ) {... } main m0001 id id 2 <method i d = m0001 name= main >... </method> method id id DITA-OT DITA XSL 3. 4. 2 Sapid 2. 1. 2 Sapid Sapid
C API // #id=*** 4 XSL XSL 4. 1 XSL XML DITA 4) 5) Java Javadoc XML id 5 DITA class method field DITA DITA DTD XML DOCTYPE id XML id XSL 3 XSL Saxon9.5[3] Saxon DITA-OT DITA 5 XSL XML DOCTYPE DITA Java class method title Java id 6 DITA XSL XML Java XSL DITA DITA 4. 2 6 id [1] Altova: UML, http://www.altova.com/ ja/umodel.html. [2] DITA : DITA, http://dita-jp.org/?cat=13. [3] Kay, M. H.: The SAXON XSLT and XQuery Processor, http://saxon.sourceforge.net/. [4] OASIS: The DITA Open Toolkit DITA XML.org, http://dita.xml.org/wiki/the-dita-open-toolkit.
[5] OASIS DocBook Technical Committee: Doc- Book.org, http://www.docbook.org/. [6] : 2007,, 2007. [7],, : XML, (2001), pp. 129 140. [8] : Sapid Home Page (in Japanese), http: //www.sapid.org/index-ja.html. [9], : DITA, (2012).
: 3 sample01.xsl 1 <?xml version= 1. 0 encoding= UTF 8?> 2 <x s l : s t y l e s h e e t version= 2. 0 xml:space= p r e s e r v e 3 x m l n s : x s l= h t t p : //www. w3. org /1999/XSL/ Transform > 4 <x s l : o u t p u t method= t e x t encoding= UTF 8 /> 5 <x s l : v a r i a b l e name= prjname 6 s e l e c t= /map/ t i t l e /> 7 8 <! r o o t > 9 <x s l : t e m p l a t e match= / > 10 <x s l : v a l u e o f s e l e c t= $prjname /> 11 <x s l : a p p l y templates s e l e c t= map/ t o p i c r e f /> 12 </ x s l : t e m p l a t e> 13 14 <! t o p i c r e f > 15 <x s l : t e m p l a t e match= t o p i c r e f [ @type= concept ] > 16 <x s l : v a r i a b l e name= t o p i c 17 s e l e c t= document ( @href ) /> 18 <! [ ] / [ ]. j a v a > 19 <x s l : r e s u l t document 20 h r e f= {$prjname }/{ t r a n s l a t e ( @href,. dita,. java ) } 21 method= t e x t encoding= UTF 8 > 22 23 <x s l : a p p l y templates s e l e c t= $ t o p i c // concept /> 24 </ x s l : r e s u l t document> 25 </ x s l : t e m p l a t e> 26 27 <! concept > 28 <x s l : t e m p l a t e match= concept > 29 // #id=<x s l : v a l u e o f s e l e c t= @id /> 30 / 31 <x s l : v a l u e o f s e l e c t= s h o r t d e s c /> 32 / 33 <x s l : v a l u e o f s e l e c t= conbody/ c l a s s / @modifier /> c l a s s <x s l : v a l u e o f s e l e c t= t i t l e /> { 34 <x s l : a p p l y templates s e l e c t= conbody/ c l a s s / f i e l d /> 35 <x s l : a p p l y templates s e l e c t= conbody/ c l a s s /method /> 36 } 37 </ x s l : t e m p l a t e> 38 39 <! f i e l d > 40 <x s l : t e m p l a t e match= f i e l d > 41 / 42 <x s l : v a l u e o f s e l e c t= p /> 43 / 44 // #id=<x s l : v a l u e o f s e l e c t= @id /> 45 <x s l : v a l u e o f s e l e c t= @modifier /> <x s l : v a l u e o f s e l e c t= @type /> < x s l : v a l u e o f s e l e c t= @name /> = <x s l : v a l u e o f s e l e c t= @initval />; 46 </ x s l : t e m p l a t e> 47 48 <! method >
49 <x s l : t e m p l a t e match= method > 50 / 51 <x s l : a p p l y templates s e l e c t= p /> 52 <x s l : a p p l y templates s e l e c t= param mode= javadoc /> 53 <x s l : a p p l y templates s e l e c t= r e t u r n mode= javadoc /> 54 / 55 // #id=<x s l : v a l u e o f s e l e c t= @id /> 56 <x s l : v a l u e o f s e l e c t= @modifier /> <x s l : a p p l y templates s e l e c t= r e t u r n mode= code /> <x s l : v a l u e o f s e l e c t= @name /> (<x s l : a p p l y templates s e l e c t= param [ 1 ] mode= code p /><x s l : a p p l y templates s e l e c t= param [ 2 &l t ;= p o s i t i o n ( ) ] mode= code ps />) { 57 } 58 </ x s l : t e m p l a t e> 59 60 <! method/param > 61 <x s l : t e m p l a t e match= param mode= code p > 62 <x s l : v a l u e o f s e l e c t= @modifier /> <x s l : v a l u e o f s e l e c t= @type /> < x s l : v a l u e o f s e l e c t= @name /> 63 </ x s l : t e m p l a t e> 64 <! method/param > 65 <x s l : t e m p l a t e match= param mode= code ps > 66, <x s l : v a l u e o f s e l e c t= @modifier /> <x s l : v a l u e o f s e l e c t= @type /> <x s l : v a l u e o f s e l e c t= @name /> 67 </ x s l : t e m p l a t e> 68 <x s l : t e m p l a t e match= param mode= javadoc > 69 @param <x s l : v a l u e o f s e l e c t= @name /> <x s l : v a l u e o f s e l e c t=. /> 70 </ x s l : t e m p l a t e> 71 72 <! method/ r e t u r n > 73 <x s l : t e m p l a t e match= r e t u r n mode= code > 74 <x s l : v a l u e o f s e l e c t= @type /> 75 </ x s l : t e m p l a t e> 76 <x s l : t e m p l a t e match= r e t u r n mode= javadoc > 77 @return <x s l : v a l u e o f s e l e c t=. /> 78 </ x s l : t e m p l a t e> 79 </ x s l : s t y l e s h e e t> 4 map01.ditamap 1 <?xml version= 1. 0 encoding= utf 8?> 2 <! <!DOCTYPE bookmap PUBLIC //OASIS//DTD DITA BookMap//EN bookmap. dtd > > 3 <map i d= map sample xml:lang= ja jp > 4 < t i t l e>samplejavaproject</ t i t l e> 5 6 <t o p i c r e f h r e f= Fan. d i t a type= concept /> 7 8 </map> 5 Fan.dita 1 <?xml version= 1. 0 encoding= UTF 8?> 2 <! <!DOCTYPE co nce pt PUBLIC //OASIS//DTD DITA Concept //EN c once pt. dtd > > 3 <concept i d= j c 0 1 xml:lang= ja jp >
4 < t i t l e>fan</ t i t l e> 5 <s h o r t d e s c> </ s h o r t d e s c> 6 <conbody> 7 <c l a s s m o d i f i e r= p u b l i c > 8 < f i e l d m o d i f i e r= p u b l i c s t a t i c f i n a l type= i n t id= j c 0 1 f 0 1 name= MODE TURN OFF 9 i n i t V a l= 0 > 10 <p> </p> 11 </ f i e l d> 12 < f i e l d m o d i f i e r= p u b l i c s t a t i c f i n a l type= i n t id= j c 0 1 f 0 2 name= MODE LOW 13 i n i t V a l= 1 > 14 <p> </p> 15 </ f i e l d> 16 < f i e l d m o d i f i e r= p u b l i c s t a t i c f i n a l type= i n t id= j c 0 1 f 0 3 name= MODE HIGH 17 i n i t V a l= 2 > 18 <p> </p> 19 </ f i e l d> 20 < f i e l d m o d i f i e r= p r i v a t e type= i n t i d= j c 0 1 f 0 3 name= mode 21 i n i t V a l= MODE TURN OFF > 22 <p> </p> 23 </ f i e l d> 24 <method m o d i f i e r= p u b l i c r e t= void i d= jc01m01 name= setmode > 25 <param type= i n t name= mode > </param> 26 <p> </p> 27 </ method> 28 <method m o d i f i e r= p u b l i c id= jc01m02 name= getmode > 29 <r e t u r n type= i n t >MODE TURN OFF, MODE LOW, MODE HIGH</ r e t u r n> 30 <p> </p> 31 </ method> 32 <method m o d i f i e r= p u b l i c r e t= i n t i d= jc01m03 name= g e t V e l o c i t y > 33 <r e t u r n type= i n t > [m/ s ]</ r e t u r n> 34 <p> </p> 35 </ method> 36 </ c l a s s> 37 </ conbody> 38 </ concept> 6 Fan.java 1 2 3 4 // #i d=j c 0 1 5 / 6 7 / 8 public class Fan { 9 10 / 11 12 / 13 // #i d=j c 0 1 f 0 1 14 public s t a t i c f i n a l int MODE TURN OFF = 0 ;
15 16 / 17 18 / 19 // #i d=j c 0 1 f 0 2 20 public s t a t i c f i n a l int MODELOW = 1 ; 21 22 / 23 24 / 25 // #i d=j c 0 1 f 0 3 26 public s t a t i c f i n a l int MODE HIGH = 2 ; 27 28 / 29 30 / 31 // #i d=j c 0 1 f 0 3 32 private int mode = MODE TURN OFF; 33 34 35 / 36 37 38 @param mode 39 40 41 / 42 // #i d=jc01m01 43 public setmode ( 44 int mode 45 ) { 46 } 47 48 / 49 50 51 52 @return MODE TURN OFF, MODE LOW, MODE HIGH 53 54 / 55 // #i d=jc01m02 56 public 57 int 58 getmode ( ) { 59 } 60 61 / 62 63 64 65 @return [m/ s ] 66 67 / 68 // #i d=jc01m03 69 public
70 int 71 g e t V e l o c i t y ( ) { 72 } 73 74 }