24.08.2015 Views

Oxygen XML Author plugin 13.2.0

Oxygen XML Author plugin 13.2.0

Oxygen XML Author plugin 13.2.0

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Large DocumentsLet's consider the case of documenting a large project. It is likely to be several people involved. The resulting documentcan be few megabytes in size. How to deal with this amount of data in such a way the work parallelism would not beaffected ?Fortunately, <strong>XML</strong> provides two solutions for this: DTD entities and XInclude. It can be created a master document,with references to the other document parts, containing the document sections. The users can edit individually thesections, then apply an XSLT stylesheet over the master and obtain the result files, let say PDF or HTML.Including Document Parts with DTD EntitiesThere are two conditions for including a part using DTD entities:• The master document should declare the DTD to be used, while the external entities should declare the <strong>XML</strong> sectionsto be referred;• The document containing the section must not define again the DTD.Editing Documents | 66A master document looks like this: ...The referred document looks like this: ... here comes the section content ... Note:The indicated DTD and the element names (section, chapter) are used here only for illustrating the inclusionmechanism. You can use any DTD and element names you need.At a certain point in the master document there can be inserted the section testing.xml entity:... &testing; ...When splitting a large document and including the separate parts in the master file using external entities, only the masterfile will contain the Document Type Definition (the DTD) or other type of schema. The included sections can't defineagain the schema because the main document will not be valid. If you want to validate the parts separately you have touse XInclude for assembling the parts together with the master file.Including Document Parts with XIncludeXInclude is a standard for assembling <strong>XML</strong> instances into another <strong>XML</strong> document through inclusion. It enables largerdocuments to be dynamically created from smaller <strong>XML</strong> documents without having to physically duplicate the contentof the smaller files in the main file. XInclude is targeted as the replacement for External Entities. The advantage of usingXInclude is that, unlike the entities method, each of the assembled documents is permitted to contain a Document TypeDeclaration (DOCTYPE Decl.). This means that each file is a valid <strong>XML</strong> instance and can be independently validated.It also means that the main document to which smaller instances are included can be validated without having to removeor comment the DOCTYPE Decl. as is the case with External Entities. This makes XInclude a more convenient andeffective method for managing <strong>XML</strong> instances that need to be stand-alone documents and part of a much larger project.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!