XLink Indexing and Linking

Ivan Marsic • Rutgers University 246 such as a Web browser, print composition engine, or document reader how to translate the logical structure of a source document into a presentational structure. The XMLXSL relationship is reminiscent of the Model-View-Controller design pattern [Gamma et al ., 1995], which separates the core data from the way it gets visualized. Likewise, XSL enables us to separate the view from the actual data represented in XML. This has following advantages: Reuse of data: When the data is separate you do not need to transform the actual data to represent it in some other form. We can just use a different view of the data. Multiple output formats: When view is separate from the data we can have multiple output formats for the same data e.g. the same XML file can be viewed using XSL as VRML, HTML, XML of some other form Reader’s preferences: The view of the same XML file can be customized with the preferences of the user. Standardized styles: Within one application domain there can be certain standard styles which are common throughout the developer community. Freedom from content authors: A person not so good at presentation can just write the data and have a good presenter to decide on how to present the data. Different ways of displaying an XML files are shown in Figure 6-7. XSL can act as a translator, because XSL can translate XML documents that comply with two different XML schemas. XSL is an unfortunate name, since you may think it deals only with stylesheets. That is not true, it is much more general and as I said, XSL can translate any XML document to any other XML document. XSL Example The following example shows an original XML document transformed to an HTML document. XML XSL HTML text XML Transformation Engine XSL Processor General form of a template rule: xsl:template match=pattern ... action ... xsl:template Figure 6-7. How XSL transformation works. Chapter 6 • XML and Data Representation 247 Listing 6-11: Example XSL document. Original XML source: 1 ?xml version=1.0? 2 paraThis is a emphasistestemphasis.para XSL stylesheet: 1 ?xml version=1.0? 2 xsl:stylesheet 3 xmlns:xsl=http:www.w3.org1999XSLFormat version=1.0 4 5 xsl:template match=para 6 pxsl:apply-templatesp 7 xsl:template 8 9 xsl:template match=emphasis 10 ixsl:apply-templatesi 11 xsl:template 12 13 xsl:stylesheet Resultant HTML source: 1 ?xml version=1.0 encoding=utf-8? 2 pThis is a itesti.p XGMML eXtensible Graph Markup and Modeling Language 1.0 Draft http:www.cs.rpi.edu~puninjXGMMLdraft-xgmml.html Mark Pilgrim returns with his latest Dive into XML column, XML on the Web Has Failed, claiming that XML on the Web has failed miserably, utterly, and completely. Is Mark right or wrong? You be the judge. http:www.xml.compuba20040721dive.html

6.5 Summary and Bibliographical Notes

As a historical footnote, XML is derived from SGML Standard Generalized Markup Language, which is a federal FIPS 152 and international ISO 8879 standard for identifying the structure and content of documents.