12.6 SGML and XML

 < Day Day Up > 



The same motivation that led to the introduction of EXPRESS language as a part of the STEP standard is valid for SGML, ISO 8879:1986 standard [14]. The main purposes of languages such as SGML are to separate data from tools, formats from contents, and to provide a means of specifying formats in a standard way. The first purpose makes it possible to use different tools for obtaining the same information (e.g., to edit the same document using different word processors)—to be independent of a particular tool or a particular tool version. The second purpose provides the ability to present the same information in different formats. The third purpose enables the exchange of information between different tools that use different formats and different protocols for data exchange.

SGML is a markup language. We can define markup as a text encoding-(i.e., as any means of making explicit an interpretation of a text). A markup language specifies which markups are allowed, which markups are required, how markups are distinguished from text, and what the markups mean. HTML is a markup language. For example, an HTML sequence <B>home</B> includes <B> and </B> markups, which means that the text home will be presented in boldface style. SGML is slightly different from HTML. SGML provides the means of doing the first three factors; the last part—the meaning of the markup—is not a part of SGML. Additional definitions are required to describe the meaning of the markup.

In general, we can distinguish three characteristics specific to SGML: it uses descriptive markup, it includes a document-type concept, and it is independent of any one system for representing the script in which a text is written. A descriptive markup means a use of codes that simply provide names to categorize parts of a document (e.g., a paragraph or a list). Another type of markup system, a procedural markup system defines the processing that is to be carried out at particular points in a document (e.g., define margin or begin in the next line). With descriptive instead of procedural markup, the same document can be directly processed by different software and for different purposes. SGML uses the notion of a document type and, according to this, a document type definition. Its constituent parts and their structure formally define the type of a document. For example, the definition of a book might be the following: a book consists of a title and an author, followed by a sequence of chapters that contain text. Any document lacking a title, according to this formal definition, would not formally be a book. If documents are of known types, special programs (designated as parser) can be used to process a document of a particular type and check that all of the required parts are present and correctly ordered. More importantly, different documents of the same type can be processed in a uniform way.

With such characteristics, SGML was a promising approach, and not surprisingly much work related to STEP and SGML was begun. Several word processors were supplemented with support for the SMGL documentation format. However, the complicated structure of SGML and the lack of support for tools resulted in less acceptance of SGML than expected. In the meantime, the boom in Web and HTML made it clear that a simpler format than SGML and compatible with HTML would be more successful. This indeed appeared. With the introduction of XML [15, 16], its use exploded in virtually all known engineering and computer domains.

XML is a subset of SGML and contains almost all of its characteristics. Any XML document is a type of SGML document. XML separates contents from a format and format from a presentation in the same way as SGML. The following document shows an example of an XML file.

 <xml version="1.0" ?>      <Book Author="Thea Smith">       <Title>Sample Book</Title>      <Chapter >        This is an ordinary text that belongs to Chapter 1.      </Chapter>      <Chapter >        This text belongs to Chapter 2.     </Chapter>  </Book>  

The grammatical rules for this XML file are expressed in a document type definition file.

 <!DOCTYPE Book [      <!ELEMENT Book (Title, Chapter+)>     <!ATTLIST Book Author CDATA #REQUIRED>     <! ELEMENT Title (#PCDATA)>     <!ELEMENT Chapter (#PCDATA)>     <!ATTLIST Chapter id ID #REQUIRED>  ]>  

XML is used for the specification of formats of data, for exchanging data, for protocols between different components, for storing data, for specification of new languages, and in general for any kind of information management process. In many domains, XML is used to formalize the domain’s information model, and many tools manage XML documents. XML has had a large impact on STEP. XML representation for EXPRESS-driven data is included as a part of the STEP standard. XML binding with STEP is a revolutionary change that makes STEP data much easier to use. Traditional STEP implementation methods require programming by expensive, expert programmers, but by using this binding, the facilities of XML can be used to directly enable simple description and processing of STEP data.



 < Day Day Up > 



Implementing and Integraing Product Data Management and Software Configuration[... ]ement
Implementing and Integrating Product Data Management and Software Configuration Management (Artech House Computing Library)
ISBN: 1580534988
EAN: 2147483647
Year: 2006
Pages: 122

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net