Skip to content

Instantly share code, notes, and snippets.

@mjlassila
Created January 12, 2011 09:34
Show Gist options
  • Save mjlassila/775937 to your computer and use it in GitHub Desktop.
Save mjlassila/775937 to your computer and use it in GitHub Desktop.
Harjoitustehtävien esimerkkidokumentit
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE prices SYSTEM "prices.dtd">
<prices>
<book year="1992" id="b1">
<title>Advanced Programming in the Unix environment</title>
<store>
<source>bstore2.example.com</source>
<price>65.95</price>
</store>
<store>
<source>bstore1.example.com</source>
<price>65.95</price>
</store>
<store>
<source>www.bol.com</source>
<price>45.95</price>
</store>
<tip>
<xref idref="b2" />
</tip>
</book>
<book year="1994" id="b2">
<title>TCP/IP Illustrated</title>
<store>
<source>bstore2.example.com</source>
<price>65.95</price>
</store>
<store>
<source>bstore1.example.com</source>
<price>65.95</price>
</store>
<tip>
<xref idref="b1" />
</tip>
</book>
<book year="2000" id="b3">
<title>Data on the Web</title>
<store>
<source>bstore2.example.com</source>
<price>34.95</price>
</store>
<store>
<source>bstore1.example.com</source>
<price>39.95</price>
</store>
</book>
<book year="1999" id="b4">
<title>The Economics of Technology and Content for Digital
TV</title>
<store>
<source>www.amazon.com</source>
<price>34.95</price>
</store>
<store>
<source>www.bol.com</source>
<price>69.95</price>
</store>
</book>
<book year="1982" available="no" id="b5">
<title>Getting started with SGML</title>
<store>
<source>www.mystore.com</source>
<price>14.95</price>
</store>
<store>
<source>www.bol.com</source>
<price>45.95</price>
</store>
</book>
<book year="1980" available="no" id="b6">
<title>Drawbacks of procedural markup</title>
<store>
<source>bstore2.example.com</source>
<price>25.95</price>
</store>
<tip>
<xref idref="b5" />
</tip>
</book>
<book year="1950" available="no" id="b7">
<title>Lords of the Ring</title>
<store>
<source>bstore1.example.com</source>
<price>55.95</price>
</store>
<store>
<source>bstore2.example.com</source>
<price>65.95</price>
</store>
<store>
<source>bstore3.example.com</source>
<price>25.95</price>
</store>
<store>
<source>www.bol.com</source>
<price>45.95</price>
</store>
<store>
<source>www.amazon.com</source>
<price>55.95</price>
</store>
</book>
<book year="2003" id="b8">
<title>XQuery from the experts</title>
<store>
<source>bstore2.example.com</source>
<price>55.95</price>
</store>
<store>
<source>www.amazon.com</source>
<price>50.95</price>
</store>
<tip>
<xref idref="b9" />
</tip>
</book>
<book year="1999" id="b9">
<title>XSLT: programmers reference</title>
<store>
<source>bstore2.example.com</source>
<price>35.95</price>
</store>
<store>
<source>www.amazon.com</source>
<price>40.95</price>
</store>
<tip>
<xref idref="b8" />
<xref idref="b5" />
</tip>
</book>
</prices>
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE report SYSTEM "report.dtd">
<report>
<title>Getting started with SGML</title>
<chapter number="1">
<title>The business challenge</title>
<author>
<last>Stevens</last>
<first>W.</first>
</author>
<intro>
<para>With the ever-changing and growing global market,
companies and large organizations are searching for ways to
become more viable and competitive. Downsizing and other
cost-cutting measures demand more efficient use of corporate
resources. One very important resource is an organization's
information.</para>
<para>As part of the move toward integrated information
management, whole industries are developing and implementing
standards for exchanging technical information. This report
describes how one such standard, the Standard Generalized
Markup Language (SGML), works as part of an overall
information management strategy.</para>
<graphic graphname="infoflow" />
</intro>
</chapter>
<chapter number="2">
<title>Getting to know SGML</title>
<author>
<last>Stevens</last>
<first>W.</first>
</author>
<intro>
<para>While SGML is a fairly recent technology, the use of
<emph>markup</emph>in computer-generated documents has
existed for a while.</para>
</intro>
<section shorttitle="What is markup?">
<title>What is markup, or everything you always wanted to
know about document preparation but were afraid to
ask?</title>
<intro>
<para>Markup is everything in a document that is not
content. The traditional meaning of markup is the manual
<emph>marking</emph>up of typewritten text to give
instructions for a typesetter or compositor about how to
fit the text on a page and what typefaces to use. This kind
of markup is known as
<emph>procedural markup</emph>.</para>
</intro>
<topic id="top1" number="1">
<title>Procedural markup</title>
<keyword>Markup</keyword>
<para security="u">Most electronic publishing systems today
use some form of procedural markup. Procedural markup codes
are good for one presentation of the information.</para>
</topic>
<topic id="top2" number="2">
<title>Generic markup</title>
<keyword>Markup</keyword>
<para>Generic markup (also known as descriptive markup)
describes the
<emph>purpose</emph>of the text in a document. A basic
concept of generic markup is that the content of a document
must be separate from the style. Generic markup allows for
multiple presentations of the information.</para>
</topic>
<topic id="top3" number="3">
<title>Drawbacks of procedural markup</title>
<keyword>Markup</keyword>
<para security="u">Industries involved in technical
documentation increasingly prefer generic over
<emph>procedural</emph>markup schemes. When a company
changes software or hardware systems, enormous data
translation tasks arise, often resulting in errors.</para>
</topic>
</section>
<section shorttitle="What is SGML?">
<title>What
<emph>is</emph>SGML in the grand scheme of the universe,
anyway?</title>
<intro>
<para>SGML defines a strict markup scheme with a syntax for
defining document data elements and an overall framework
for marking up documents.</para>
<para>SGML can describe and create documents that are not
dependent on any hardware, software, formatter, or
operating system. Since SGML documents conform to an
international standard, they are portable.</para>
</intro>
</section>
<section shorttitle="How does SGML work?">
<title>How is SGML and would you recommend it to your
grandmother?</title>
<intro>
<para>You can break a typical document into three layers:
structure, content, and style. SGML works by separating
these three aspects and deals mainly with the relationship
between structure and content.</para>
</intro>
<topic id="top4" number="4">
<title>Structure</title>
<keyword>DTD</keyword>
<para>At the heart of an SGML application is a file called
the DTD, or Document Type Definition. The DTD sets up the
structure of a document, much like a database schema
describes the types of information it handles.</para>
<para security="u">A database schema also defines the
relationships between the various types of data. Similarly,
a DTD specifies
<emph>rules</emph>to help ensure documents have a
consistent, logical structure.</para>
</topic>
<topic id="top5" number="5">
<title>Content</title>
<keyword>Markup</keyword>
<para>Content is the information itself. The method for
identifying the information and its meaning within this
framework is called
<emph>tagging</emph>. Tagging must conform to the rules
established in the DTD (see
<xref idref="top4" />).</para>
<graphic graphname="tagexamp" />
</topic>
<topic id="top6" number="6">
<title>Style</title>
<para>SGML does not standardize style or other processing
methods for information stored in SGML.</para>
</topic>
</section>
</chapter>
<chapter number="3">
<title>Resources</title>
<author>
<last>Abiteboul</last>
<first>Serge</first>
</author>
<author>
<last>Buneman</last>
<first>Peter</first>
</author>
<author>
<last>Suciu</last>
<first>Dan</first>
</author>
<section>
<title>Conferences, tutorials, and training</title>
<intro>
<para>The Graphic Communications Association has been
instrumental in the development of SGML. conferences,
tutorials, newsletters, and for both members and
non-members.</para>
<para security="c">Exiled members of the Union's secret
police, the KGB, have infiltrated the upper ranks of the
GCA and are planning the Final Revolution as soon as DSSSL
is completed.</para>
</intro>
</section>
</chapter>
</report>

Elementtien nimet ja viittaukset niihin harjoitustehtävissä

  • para -> tekstikappale
  • title -> otsikko (myös osion otsikko, luvun otsikko, aihekokonaisuuden otsikko jne.)
  • section -> osa, osio
  • chapter -> luku
  • topic -> aihekokonaisuus
  • book title -> nimeke
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment