home *** CD-ROM | disk | FTP | other *** search
/ Chip 1998 November / CHIP_CD_1998_11_PL.iso / offline / internet / xml / xmlfaq / faq.sgml < prev    next >
Encoding:
SGML Document  |  1998-09-17  |  73.4 KB  |  1,189 lines

  1. <!DOCTYPE ARTICLE PUBLIC "+//Silmaril//DTD DocBook V3.0-Based Extension With HTML Forms//EN"
  2.  --"http://www.ucc.ie/dtds/dbhtform.dtd"--
  3. [
  4. <!ENTITY TeX CDATA "TeX">
  5. <!ENTITY amp CDATA "&">
  6. <!ENTITY apos CDATA "'">
  7. <!ENTITY dollar CDATA "$">
  8. <!ENTITY gt CDATA ">">
  9. <!ENTITY hellip CDATA " . . . ">
  10. <!ENTITY lt CDATA "<">
  11. <!ENTITY para CDATA "╢">
  12. <!ENTITY pi CDATA "╥">
  13. <!ENTITY plusmn CDATA "▒">
  14. <!ENTITY sect CDATA "º">
  15. <!ENTITY trade CDATA "TM">
  16. <!ENTITY xmlfiles PUBLIC "+//Silmaril//NONSGML The XML Files//EN" "head-xmlfiles.gif"
  17.  NDATA GIF>
  18. <!ENTITY xmllogo PUBLIC "+//Silmaril//NONSGML XML Logo//EN" "xml.gif" NDATA GIF
  19. >
  20. ]>
  21. <?ATTLINK ULINK URL URI>
  22. <ARTICLE><ARTHEADER><TITLE>Frequently Asked Questions about the
  23. Extensible Markup Language</TITLE>
  24. <TITLEABBREV>The XML FAQ
  25. <INLINEGRAPHIC FILEREF="xml.gif" FORMAT="GIF" XREFLABEL="[logo]"></INLINEGRAPHIC>&xmllogo;</TITLEABBREV>
  26. <ISSUENUM>1.21 (3 February 1998)</ISSUENUM>
  27. <BIBLIOSET><BIBLIOMISC>Maintained on behalf of the World Wide Web
  28. Consortium's XML Special Interest Group by</BIBLIOMISC>
  29. <AUTHORGROUP><EDITOR ID="faq-editor"><FIRSTNAME>Peter</FIRSTNAME>
  30. <SURNAME>Flynn</SURNAME>
  31. <AFFILIATION><ORGNAME>University College Cork</ORGNAME></AFFILIATION></EDITOR></AUTHORGROUP>
  32. <BIBLIOMISC>with the collaboration of</BIBLIOMISC>
  33. <AUTHORGROUP><OTHERCREDIT><FIRSTNAME>Terry</FIRSTNAME> <SURNAME>Allen</SURNAME>
  34. <AFFILIATION><ORGNAME></ORGNAME></AFFILIATION></OTHERCREDIT>
  35. <OTHERCREDIT><FIRSTNAME>Tom</FIRSTNAME> <SURNAME>Borgman</SURNAME>
  36. <AFFILIATION><ORGNAME>Harlequin Ltd</ORGNAME></AFFILIATION></OTHERCREDIT>
  37. <OTHERCREDIT><FIRSTNAME>Tim</FIRSTNAME> <SURNAME>Bray</SURNAME>
  38. <AFFILIATION><ORGNAME>Textuality, Inc</ORGNAME></AFFILIATION></OTHERCREDIT>
  39. <OTHERCREDIT><FIRSTNAME>Robin</FIRSTNAME> <SURNAME>Cover</SURNAME>
  40. <AFFILIATION><ORGNAME>Summer Institute of Linguistics</ORGNAME></AFFILIATION></OTHERCREDIT>
  41. <OTHERCREDIT><FIRSTNAME>Christopher</FIRSTNAME> <SURNAME>Maden</SURNAME>
  42. <AFFILIATION><ORGNAME>O'Reilly & Associates</ORGNAME></AFFILIATION></OTHERCREDIT>
  43. <OTHERCREDIT><FIRSTNAME>Eve</FIRSTNAME> <SURNAME>Maler</SURNAME>
  44. <AFFILIATION><ORGNAME>Arbortext, Inc</ORGNAME></AFFILIATION></OTHERCREDIT>
  45. <OTHERCREDIT><FIRSTNAME>Peter</FIRSTNAME> <SURNAME>Murray-Rust</SURNAME>
  46. <AFFILIATION><ORGNAME>Nottingham University</ORGNAME></AFFILIATION></OTHERCREDIT>
  47. <OTHERCREDIT><FIRSTNAME>Liam</FIRSTNAME> <SURNAME>Quin</SURNAME>
  48. <AFFILIATION><ORGNAME></ORGNAME></AFFILIATION></OTHERCREDIT>
  49. <OTHERCREDIT><FIRSTNAME>Michael</FIRSTNAME> <SURNAME>Sperberg-McQueen</SURNAME>
  50. <AFFILIATION><ORGNAME>University of Illinois at Chicago</ORGNAME></AFFILIATION></OTHERCREDIT>
  51. <OTHERCREDIT><FIRSTNAME>Joel</FIRSTNAME> <SURNAME>Weber</SURNAME>
  52. <AFFILIATION><ORGNAME>MIT</ORGNAME></AFFILIATION></OTHERCREDIT>
  53. <OTHERCREDIT><SURNAME>Murata</SURNAME> <FIRSTNAME>Makoto</FIRSTNAME><AFFILIATION>
  54. <ORGNAME>Fuji Xerox Information Systems</ORGNAME></AFFILIATION></OTHERCREDIT></AUTHORGROUP>
  55. <BIBLIOMISC>and many other members of the </BIBLIOMISC>
  56. <AUTHORGROUP><OTHERCREDIT><CONTRIB>XML Special Interest Group of the
  57. W3C</CONTRIB>
  58. <CONTRIB>as well as FAQ readers around the world. Please use the form
  59. at the end for any corrections or additions.</CONTRIB></OTHERCREDIT></AUTHORGROUP>
  60. <REVHISTORY ID="faq-revhist"><REVISION><REVNUMBER>0.1</REVNUMBER>
  61. <DATE>31 January 1997</DATE> <AUTHORINITIALS>PF</AUTHORINITIALS>
  62. <REVREMARK>First draft. Sample questions devised by participants.</REVREMARK></REVISION>
  63. <REVISION><REVNUMBER>0.2</REVNUMBER> <DATE>3 February 1997</DATE>
  64. <AUTHORINITIALS>PF</AUTHORINITIALS> <REVREMARK>Revised draft.
  65. Additional questions and answers.</REVREMARK></REVISION>
  66. <REVISION><REVNUMBER>0.3</REVNUMBER> <DATE>17 February 1997</DATE>
  67. <AUTHORINITIALS>PF</AUTHORINITIALS> <REVREMARK>Extensive revision
  68. following comments from the group. Changes to markup and organization.</REVREMARK></REVISION>
  69. <REVISION><REVNUMBER>0.4</REVNUMBER> <DATE>23 February 1997</DATE>
  70. <AUTHORINITIALS>PF</AUTHORINITIALS> <REVREMARK>Minor editorial changes</REVREMARK></REVISION>
  71. <REVISION><REVNUMBER>0.5</REVNUMBER> <DATE>1 April 1997</DATE>
  72. <AUTHORINITIALS>PF</AUTHORINITIALS> <REVREMARK>Added Multidoc Pro as
  73. SGML browser; question on XML math; fixed ambiguity in explanation of
  74. NETs; added JUMBO; ERB changes of March 26; more details of linking and
  75. tools; adding element declaration minimization to the forbidden list.</REVREMARK></REVISION>
  76. <REVISION><REVNUMBER>1.0</REVNUMBER> <DATE>1 May 1997</DATE>
  77. <AUTHORINITIALS>PF</AUTHORINITIALS> <REVREMARK>Added reference to ToC
  78. and printed URLs; added disclaimer at A6; combined old A11 with A5 to
  79. explain SGML/XML/HTML; clarified explanation of XML not replacing HTML
  80. at C1; added new course and conference at (new) A11; clarified B1, C4,
  81. C8; added FPI server at C12; removed examples in C13.</REVREMARK></REVISION>
  82. <REVISION><REVNUMBER>1.1</REVNUMBER> <DATE>1 October 1997</DATE>
  83. <AUTHORINITIALS>PF</AUTHORINITIALS> <REVREMARK>No more minimization
  84. parameters in element declarations; Parsers must now pass all
  85. white-space to the application; Everything is now case-sensitive,
  86. including all markup; A new proposal for stylesheets: XSL, which
  87. combines DSSSL and CSS in an XML format; Java[Script] and and metadata
  88. and their use in XML; Updated list of software; First XML book is
  89. published; New public mailing list XML-L</REVREMARK></REVISION>
  90. <REVISION REVISIONFLAG="ADDED"><REVNUMBER>1.2</REVNUMBER><DATE>3
  91. February 1998</DATE><AUTHORINITIALS>PF</AUTHORINITIALS><REVREMARK>Added
  92. a Mac icon (thanks to Martin Winter and others); Removed <REPLACEABLE>Draft</REPLACEABLE>
  93. from references to the spec; Changed revision colours; The RMD is gone:
  94. replaced references to it with <REPLACEABLE>standalone</REPLACEABLE>;
  95. Updated some broken URLs; [1.21] minor edits to URLs and updates on
  96. translation; Added XUA to details of MIME types;</REVREMARK></REVISION></REVHISTORY>
  97. <RELEASEINFO>Paragraphs which have been added since the last version
  98. are shown prefixed with a pilcrow (¶). Paragraphs which have been
  99. changed since the last version are shown prefixed with a section sign (§).
  100. Paragraphs marked for future deletion but retained at the moment for
  101. information are prefixed with a plus/minus sign (±).</RELEASEINFO></BIBLIOSET></ARTHEADER>
  102. <ABSTRACT><TITLE>Summary</TITLE>
  103. <PARA>This document contains the most frequently-asked questions (with
  104. answers) about XML, the Extensible Markup Language. It is intended as a
  105. first resource for users, developers, and the interested reader, and
  106. should not be regarded as a part of the
  107. <LINK LINKEND="faq-spec">XML Specification</LINK>.</PARA>
  108. </ABSTRACT>
  109. <NOTE><TITLE>Organization</TITLE>
  110. <PARA>The FAQ is divided into four parts: <ITEMIZEDLIST><LISTITEM><SIMPARA><LINK
  111. LINKEND="faq-general">General</LINK>,</SIMPARA></LISTITEM>
  112. <LISTITEM><SIMPARA><LINK LINKEND="faq-user">User</LINK>,</SIMPARA></LISTITEM>
  113. <LISTITEM><SIMPARA><LINK LINKEND="faq-author">Author</LINK>, and</SIMPARA>
  114. </LISTITEM>
  115. <LISTITEM><SIMPARA><LINK LINKEND="faq-developer">Developer</LINK></SIMPARA></LISTITEM></ITEMIZEDLIST>.
  116. The questions are numbered independently within each section. As the
  117. numbering may therefore change with each version, comments and
  118. suggestions should refer to the version number (see
  119. <LINK LINKEND="faq-revhist">Revision History</LINK> above) as well as
  120. the Part and Question Number.</PARA>
  121. <PARA>There is <LINK LINKEND="faq-form">a form</LINK> at the end of
  122. this document which you can use to submit bug reports, suggestions for
  123. improvement, and other comments relating to <EMPHASIS>this FAQ only</EMPHASIS>.
  124. Comments about the
  125. <LINK LINKEND="faq-spec">XML Specification</LINK> itself should be sent
  126. to the
  127. <ULINK URL="http://www.w3.org/">W3C</ULINK>.</PARA></NOTE>
  128. <NOTE><TITLE>Availability</TITLE>
  129. <PARA>The <LINK LINKEND="faq-sgml">SGML</LINK> file for use with any
  130. conforming SGML system is available at
  131. <FILENAME><ULINK URL="http://www.ucc.ie/xml/faq.sgml">http://www.ucc.ie/xml/faq.sgml</ULINK></FILENAME>
  132. (this can also be used online with SGML browsers like
  133. <PRODUCTNAME><ULINK
  134. URL="http://www.sq.com/products/panorama/panor-fe.htm">Panorama</ULINK></PRODUCTNAME>
  135. or <PRODUCTNAME><ULINK URL="http://www.citec.fi/mdp/index.html">Multidoc
  136. Pro</ULINK></PRODUCTNAME>; you can also
  137. <ULINK URL="http://www.ucc.ie/xml/xmlview.exe">download the DTD and
  138. stylesheet installation self-extractor</ULINK> for faster local access
  139. with these browsers, or the <ULINK URL="http://www.ucc.ie/xml/catalog">DTD
  140. set as ASCII files</ULINK>).</PARA>
  141. <PARA>The same text is available in an
  142. <ULINK URL="http://www.ucc.ie/xml/faq.html">HTML version</ULINK> for
  143. use with an HTML browser (<EMPHASIS>eg</EMPHASIS>
  144. <PRODUCTNAME><ULINK URL="http://www.netscape.com/">Netscape Navigator</ULINK></PRODUCTNAME>,
  145. <PRODUCTNAME><ULINK URL="http://www.microsoft.com/">Microsoft Internet
  146. Explorer</ULINK></PRODUCTNAME>,
  147. <PRODUCTNAME><ULINK URL="http://www.spry.com/">Spry Mosaic</ULINK></PRODUCTNAME>,
  148. <PRODUCTNAME><ULINK URL="http://www.ncsa.edu">NCSA Mosaic</ULINK></PRODUCTNAME>,
  149. <PRODUCTNAME><ULINK URL="http://kufacts.cc.ukans.edu/">Lynx</ULINK></PRODUCTNAME>,
  150. <PRODUCTNAME><ULINK URL="http://opera.nta.no">Opera</ULINK></PRODUCTNAME>,
  151. <PRODUCTNAME><ULINK URL="http://www.cs.indiana.edu/???">GNUscape
  152. Navigator</ULINK></PRODUCTNAME>
  153. <EMPHASIS>etc</EMPHASIS>) at <FILENAME><ULINK
  154. URL="http://www.ucc.ie/xml/">http://www.ucc.ie/xml/</ULINK></FILENAME>.</PARA>
  155. <PARA>An XML version will be produced once the specification has been
  156. agreed and when DTDs and browsers are available to handle it. </PARA>
  157. <PARA>A plaintext (ASCII) version is available
  158. <ULINK URL="http://www.ucc.ie/xml/faq.txt">from the Web</ULINK> and
  159. (eventually) by
  160. <ULINK URL="http://www.ucc.ie/doc/other/howtoftp.html" REMAP="ULINK">anonymous
  161. FTP</ULINK> to one of several <ULINK URL="ftp://rtfm.mit.edu/">FAQ
  162. repositories</ULINK>. The versions above are also available by
  163. <ULINK URL="mailto:webmail@www.ucc.ie">electronic mail</ULINK> to the
  164. <PRODUCTNAME><ULINK URL="http://www.ucc.ie/webmail/">WebMail</ULINK></PRODUCTNAME>
  165. server (for users with email-only access). </PARA>
  166. <PARA>For printed copies there are PostScript<SUPERSCRIPT>™</SUPERSCRIPT>
  167. versions for <ULINK URL="http://www.ucc.ie/xml/faqa4.ps">A4</ULINK> and
  168. <ULINK URL="http://www.ucc.ie/xml/faqlet.ps">Letter</ULINK> sizes of
  169. paper.</PARA>
  170. <PARA>The document is also available in oil-based toner on flattened
  171. dead trees by sending
  172. $10 (or equivalent) to the
  173. <ULINK URL="mailto:silmaril@m-net.arbornet.org">editor</ULINK> (email
  174. first to check currency and postal address).</PARA>
  175. <PARA REVISIONFLAG="CHANGED">Thanks to Murata Makoto for making this
  176. document available in Japanese: see <FILENAME><ULINK
  177. URL="http://www.fxis.co.jp/DMS/sgml/xml/xmlfaq.html">http://www.fxis.co.jp/DMS/sgml/xml/xmlfaq.html</ULINK></FILENAME></PARA>
  178. <PARA>You can download <ULINK URL="xml.gif">the XML logo</ULINK> and
  179. an icon for your files in <ULINK URL="xml.ico">ICO</ULINK> (Microsoft
  180. Windows), <ULINK URL="xml_folder_icon.sit.hqx">Mac</ULINK>, or
  181. <ULINK URL="xml.xpm">XBM</ULINK> (X Window system) format.</PARA></NOTE>
  182. <SECT1 ID="faq-general"><TITLE>General questions</TITLE>
  183. <SECT2 ID="faq-acro"><TITLE>What is XML?</TITLE>
  184. <PARA>XML is the <WORDASWORD>Extensible Markup Language</WORDASWORD>
  185. (extensible because it is not a fixed format like
  186. <LINK LINKEND="faq-html">HTML</LINK>).  It is designed to enable the
  187. use of <LINK LINKEND="faq-sgml">SGML</LINK> on the World Wide Web.</PARA>
  188. <PARA REVISIONFLAG="CHANGED">It's actually slightly misnamed: XML
  189. itself is not a single markup language: it's a metalanguage to let
  190. you design your own markup language. A regular markup language defines a
  191. way to describe information in a certain class of documents (<FOREIGNPHRASE>eg</FOREIGNPHRASE>
  192. HTML). XML lets you define your own customized markup languages for many
  193. classes of document. It can do this because it's written in SGML,
  194. the international standard metalanguage for markup languages.</PARA></SECT2>
  195. <SECT2 ID="faq-def"><TITLE>What is XML for?</TITLE>
  196. <PARA>XML is designed <QUOTE>to make it easy and straightforward to
  197. use <LINK LINKEND="faq-sgml">SGML</LINK> on the Web: easy to define
  198. document types, easy to author and manage SGML-defined documents, and
  199. easy to transmit and share them across the Web.</QUOTE></PARA>
  200. <PARA>It defines <QUOTE>an extremely simple dialect of SGML which is
  201. completely described in the
  202. <LINK LINKEND="faq-spec">XML Specification</LINK>. The goal is to
  203. enable generic SGML to be served, received, and processed on the Web in
  204. the way that is now possible with <LINK LINKEND="faq-html">HTML</LINK>.</QUOTE></PARA>
  205. <PARA><QUOTE>For this reason, XML has been designed for ease of
  206. implementation, and for interoperability with both SGML and HTML</QUOTE>
  207. [quotes from <LINK LINKEND="faq-spec">the XML spec</LINK>].</PARA></SECT2>
  208. <SECT2 ID="faq-sgml"><TITLE>What is SGML?</TITLE>
  209. <PARA>SGML is the
  210. <ULINK URL="http://www.sil.org/sgml/sgml.html">Standard Generalized
  211. Markup Language</ULINK> (<ULINK URL="http://www.iso.ch/">ISO 8879</ULINK>),
  212. the international standard for defining descriptions of the structure
  213. and content of different types of electronic document. There is an SGML
  214. FAQ at <ULINK URL="http://www.infosys.utas.edu.au/info/sgmlfaq.txt"><SYSTEMITEM>http://www.infosys.utas.edu.au/info/sgmlfaq.txt</SYSTEMITEM></ULINK>
  215. and the SGML Web pages are at <ULINK URL="http://www.sil.org/sgml/"><SYSTEMITEM>http://www.sil.org/sgml/</SYSTEMITEM></ULINK>.</PARA></SECT2>
  216. <SECT2 ID="faq-html"><TITLE>What is HTML?</TITLE>
  217. <PARA>HTML is the
  218. <ULINK URL="http://www.w3.org/MarkUp">HyperText Markup Language</ULINK>
  219. (<ULINK URL="http://ds.internic.net/rfc/rfc1866.txt">RFC 1866</ULINK>),
  220. a specific application of <LINK LINKEND="faq-sgml">SGML</LINK> used in
  221. the <ULINK URL="http://www.w3.org/">World Wide Web</ULINK>.</PARA></SECT2>
  222. <SECT2 ID="faq-same"><TITLE>Aren't XML, SGML, and HTML all the
  223. same thing?</TITLE>
  224. <PARA>Not quite. <LINK LINKEND="faq-sgml">SGML</LINK> is the
  225. <WORDASWORD>mother tongue</WORDASWORD>, used for describing thousands
  226. of different document types in many fields of human activity, from
  227. transcriptions of ancient Sumerian scrolls to the technical
  228. documentation for stealth bombers, and from patients' clinical
  229. records to musical notation.</PARA>
  230. <PARA><LINK LINKEND="faq-sgml">HTML</LINK> is just one of these
  231. document types, the one most frequently used in the
  232. <ULINK URL="http://www.w3.org/">Web</ULINK>. It defines a single, fixed
  233. type of document with markup that lets you describe a common class of
  234. simple office-style report, with headings, paragraphs, lists,
  235. illustrations,
  236. <FOREIGNPHRASE>etc</FOREIGNPHRASE>, and some provision for hypertext
  237. and multimedia.</PARA>
  238. <PARA>XML is an abbreviated version of SGML, to make it easier for you
  239. to define your own document types, and to make it easier for programmers
  240. to write programs to handle them. It omits the more complex and
  241. less-used parts of SGML in return for the benefits of being easier to
  242. write applications, easier to understand, and more suited to delivery
  243. and interoperability over the Web. But it is still SGML, and XML files
  244. may still be parsed and validated the same as any other SGML file (see
  245. the question on <LINK LINKEND="faq-xmlsoft">XML software</LINK>).</PARA>
  246. <PARA>Programmers may find it useful to think of XML as being SGML--
  247. rather than HTML++.</PARA></SECT2>
  248. <SECT2 ID="faq-owns"><TITLE>Who is responsible for XML?</TITLE>
  249. <PARA>XML is a project of the
  250. <ULINK URL="http://www.w3.org/">World Wide Web Consortium (W3C)</ULINK>,
  251. and the development of the specification is being supervised by their
  252. XML Working Group. A Special Interest Group of co-opted contributors and
  253. experts from various fields contributes comments and reviews by email.</PARA>
  254. <PARA>XML is a public format: it is not a proprietary development of
  255. any company.</PARA></SECT2>
  256. <SECT2 ID="faq-import"><TITLE>Why is XML such an important
  257. development?</TITLE>
  258. <PARA>It removes two constraints which are holding back Web
  259. developments:</PARA>
  260. <ORDEREDLIST><LISTITEM><PARA>dependence on a single, inflexible
  261. document type (<LINK LINKEND="faq-html">HTML</LINK>);</PARA></LISTITEM>
  262. <LISTITEM><PARA>the complexity of full <LINK LINKEND="faq-sgml">SGML</LINK>,
  263. whose syntax allows many powerful but hard-to-program options.</PARA></LISTITEM></ORDEREDLIST>
  264. <PARA>XML simplifies the levels of optionality in SGML, and allows the
  265. development of user-defined document types on the Web.</PARA>
  266. </SECT2>
  267. <SECT2 ID="faq-howto"><TITLE>How does XML make SGML simpler and still
  268. let you define your own document types?</TITLE>
  269. <PARA>To make SGML simpler, XML redefines some of
  270. <LINK LINKEND="faq-sgml">SGML</LINK>'s internal values and
  271. parameters, and removes a large number of the more complex and sometimes
  272. less-used features which made it harder to write processing programs 
  273. (see Appendix A of <LINK LINKEND="faq-spec">the XML specification</LINK>).</PARA>
  274. <PARA>But it retains all of SGML's structural abilities which let
  275. you define your own document type. It also introduces a new class of
  276. document which does not require you to use a predefined document type.
  277. See the questions about
  278. <LINK LINKEND="faq-validwf"><QUOTE>valid</QUOTE> and <QUOTE>well-formed</QUOTE>
  279. documents</LINK>, and
  280. <LINK LINKEND="faq-selfdef">how to define your own document types</LINK>
  281. in the <LINK LINKEND="faq-developer">Developers' Section</LINK>.</PARA></SECT2>
  282. <SECT2 ID="faq-extend"><TITLE>Why not just carry on extending HTML?</TITLE>
  283. <PARA><LINK LINKEND="faq-html">HTML</LINK> is already overburdened
  284. with dozens of interesting but often incompatible inventions from
  285. different manufacturers, because it provides only one way of describing
  286. your information.</PARA>
  287. <PARA>XML will allow groups of people or organizations to create their
  288. own customized markup languages for exchanging information in their
  289. domain (music, chemistry, electronics, hill-walking, finance, surfing,
  290. linguistics, mathematics, knitting, history, engineering, rabbit-keeping
  291. <FOREIGNPHRASE>etc</FOREIGNPHRASE>).</PARA>
  292. <PARA>HTML is at the limit of its usefulness as a way of describing
  293. information, and while it will continue to play an important role for
  294. the content it currently represents, many new applications require a
  295. more robust and flexible infrastructure. </PARA></SECT2>
  296. <SECT2 ID="faq-word"><TITLE>Why do we need all this SGML stuff? Why
  297. not just use <PRODUCTNAME>Word</PRODUCTNAME> or <PRODUCTNAME>Notes</PRODUCTNAME>?</TITLE>
  298. <PARA>Information on a network which connects many different types of
  299. computer has to be usable on all of them. Public information cannot
  300. afford to be restricted to one make or model or manufacturer, or to cede
  301. control of its data format to private hands. It is also helpful for such
  302. information to be in a form that can be reused in many different ways,
  303. as this can minimize wasted time and effort.</PARA>
  304. <PARA><LINK LINKEND="faq-sgml">SGML</LINK> is the international
  305. standard which is used for defining this kind of application, but those
  306. who need an alternative based on different software are entirely free to
  307. implement similar services using such a system, especially if they are
  308. for private use. </PARA> </SECT2>
  309. <SECT2 ID="faq-more"><TITLE>Where do I find more information about
  310. XML?</TITLE>
  311. <PARA>Online, there's the
  312. <LINK LINKEND="faq-spec">XML Specification</LINK> and ancillary
  313. documentation available from the W3C; an
  314. <ULINK URL="http://www.sil.org/sgml/xml.html">XML section</ULINK> with
  315. an extensive list of online reference material in Robin Cover's
  316. <ULINK URL="http://www.sil.org/sgml/sgml.html">SGML pages</ULINK>; and
  317. a <ULINK URL="http://www.textuality.com/xml/">summary</ULINK> and
  318. <ULINK URL="http://www.textuality.com/xml/faq.html">condensed FAQ</ULINK>
  319. from Tim Bray.</PARA>
  320. <PARA>The items listed below are the ones the maintainer has been able
  321. to discover: please mail
  322. <ULINK URL="mailto:pflynn@imbolc.ucc.ie">me</ULINK> if you come across
  323. others. Old items are retained here for reference at the moment: they
  324. will eventually expire.</PARA>
  325. <ITEMIZEDLIST><LISTITEM><PARA REVISIONFLAG="CHANGED">Technology
  326. Appraisals Ltd are holding a seminar in London, England, on <CITETITLE>XML
  327. ready for prime time?</CITETITLE> on 6-8 April 1998.  Details from
  328. <ULINK URL="mailto:techapp@cix.compulink.co.uk">Susan Dennington</ULINK>
  329. at TAL.</PARA></LISTITEM>
  330. <LISTITEM><PARA REVISIONFLAG="ADDED">James Tauber & Associates is
  331. running a full-day tutorial on XML at <ULINK URL="http://www7.conf.au/">WWW7</ULINK>
  332. on 14 April 1998.</PARA></LISTITEM>
  333. <LISTITEM><PARA>Peter Murray-Rust is preparing an
  334. <ULINK
  335. URL="http://www.vsms.nottingham.ac.uk/vsms/java/advert/advert.txt">XML/Java
  336. Virtual Course</ULINK> entitled <CITETITLE><ULINK
  337. URL="http://www.vsms.nottingham.ac.uk/vsms/java">Scientific Information
  338. Components using Java and XML</ULINK></CITETITLE>  Details are at
  339. <FILENAME><ULINK
  340. URL="http://www.vsms.nottingham.ac.uk/vsms/java/advert/advert.txt">http://www.vsms.nottingham.ac.uk/vsms/java/advert/advert.txt</ULINK></FILENAME>.
  341. The XML will be very low-level (<FOREIGNPHRASE>ie</FOREIGNPHRASE>
  342. <LINK LINKEND="faq-wf">well-formed</LINK> only, balanced tags, and
  343. quoted attributes; no DTDs, entities, marked sections, catalogs, links,
  344. etc.) It concentrates on building element trees (including those from
  345. legacy files).</PARA></LISTITEM>
  346. <LISTITEM><PARA REVISIONFLAG="DELETED">The annual SGML Conference run
  347. by the Graphic Communications Association was renamed the SGML/XML
  348. Conference. SGML/XML '97 was held in Washington DC, 8-11 December 1997
  349. (further details on
  350. <ULINK URL="http://www.gca.org/">the GCA's Web site</ULINK>).</PARA></LISTITEM></ITEMIZEDLIST>
  351.     
  352. <PARA REVISIONFLAG="CHANGED">There is a list of books and articles on
  353. XML in Robin Cover's
  354. <ULINK URL="http://www.sil.org/sgml/sgml.html">SGML pages</ULINK>.</PARA></SECT2>
  355. <SECT2 ID="faq-mailinglist"><TITLE>Where can I discuss implementation
  356. and development of XML?</TITLE>
  357. <PARA>There is a mailing list called <FILENAME>xml-dev</FILENAME> for
  358. those committed to developing components for XML. You can subscribe by
  359. sending a 1-line mail message to
  360. <FILENAME><ULINK URL="mailto:majordomo@ic.ac.uk">majordomo@ic.ac.uk</ULINK></FILENAME>
  361. saying:<COMMAND>subscribe xml-dev <REPLACEABLE>yourname@yoursite</REPLACEABLE></COMMAND>
  362. The list is hypermailed for online reference at <FILENAME><ULINK
  363. URL="http://www.lists.ic.ac.uk/hypermail/xml-dev/">http://www.lists.ic.ac.uk/hypermail/xml-dev/</ULINK></FILENAME>.</PARA>
  364. <PARA>Note that this list is for those people actively involved in
  365. developing  resources for XML. It is <EMPHASIS>not</EMPHASIS> for
  366. general information about XML (see this FAQ and
  367. <LINK LINKEND="faq-more">other sources</LINK>) or for general
  368. discussion about SGML implementation and resources (see <FILENAME><ULINK
  369. URL="news:comp.text.sgml">comp.text.sgml</ULINK></FILENAME>).</PARA>
  370. <PARA>There is a general-purpose mailing list <FILENAME>XML-L</FILENAME>
  371. for public discussions: to subscribe, send a 1-line mail message to
  372. <FILENAME><ULINK URL="mailto:listserv@listserv.hea.ie">LISTSERV@listserv.hea.ie</ULINK></FILENAME>
  373. saying<COMMAND>subscribe XML-L <REPLACEABLE>forename</REPLACEABLE> <REPLACEABLE>surname</REPLACEABLE></COMMAND>(substituting
  374. your own forename and surname). To unsubscribe, send a 1-line message to
  375. the same address saying<COMMAND>unsubscribe XML-L</COMMAND>Please Read
  376. The Fine Documentation which you will be sent when you join either
  377. mailing list, as it contains important information, particularly about
  378. what to do when your email address changes.</PARA></SECT2></SECT1>
  379. <SECT1 ID="faq-user"><TITLE>Users of SGML (including browsers of HTML)</TITLE>
  380. <SECT2 ID="faq-usexml"><TITLE>Do I have to do anything to use XML?</TITLE>
  381. <PARA>Not yet. XML is still being developed, but there are already
  382. <LINK LINKEND="faq-browser">some pilot browsers</LINK>, so you can
  383. experiment with them. When the specification is complete, more software
  384. should start to appear, and you may be able to download browsers and use
  385. them to browse the Web much as you do with current applications.</PARA>
  386. <PARA>You can use the pilot browsers to look at some of the emerging
  387. XML material, such as
  388. <ULINK URL="ftp://sunsite.unc.edu/pub/sun-info/standards/xml/eg/">Jon
  389. Bosak's Shakespeare plays</ULINK> and the molecular experiments of
  390. the <ULINK URL="http://www.venus.co.uk/omf/cml/">Chemical Markup
  391. Language (CML)</ULINK>. There are some more example sources listed at
  392. <ULINK URL="http://www.sil.org/sgml/xml.html#examples"><SYSTEMITEM>http://www.sil.org/sgml/xml.html#examples</SYSTEMITEM></ULINK>.</PARA>
  393. <PARA>If you want to start preparations for writing your own XML, see
  394. <LINK LINKEND="faq-author">the questions in the Authors' Section</LINK>.</PARA></SECT2>
  395. <SECT2 ID="faq-xmloffer"><TITLE>Why should I use XML instead of HTML?</TITLE>
  396. <ITEMIZEDLIST><LISTITEM><PARA>Authors and providers can
  397. <LINK LINKEND="faq-doctype">design their own document types</LINK>
  398. using XML, instead of being stuck with HTML. Document types can be
  399. explicitly tailored to an audience, so the cumbersome fudging that has
  400. to take place with <LINK LINKEND="faq-html">HTML</LINK> to achieve
  401. special effects should become a thing of the past: authors and designers
  402. will be free to invent their own markup elements;</PARA></LISTITEM>
  403. <LISTITEM><PARA>Information content can be richer and easier to use,
  404. because the
  405. <LINK LINKEND="faq-hypertext">hypertext linking abilities of XML</LINK>
  406. are much greater than those of HTML.</PARA>
  407. </LISTITEM>
  408. <LISTITEM><PARA>XML can provide more and better facilities for browser
  409. presentation and  performance;</PARA></LISTITEM>
  410. <LISTITEM><PARA>It removes many of the underlying complexities of SGML
  411. in favor of a more flexible model, so writing programs to handle XML
  412. will be much easier than doing the same for full SGML.</PARA>
  413. </LISTITEM>
  414. <LISTITEM><PARA>Information will be more accessible and reusable,
  415. because the more flexible markup of XML can be used by any XML software
  416. instead of being restricted to specific manufacturers as has become the
  417. case with HTML.</PARA>
  418. </LISTITEM>
  419. <LISTITEM><PARA><LINK LINKEND="faq-valid">Valid XML files</LINK> are
  420. kosher SGML, so they can be used outside the Web as well, in an SGML
  421. environment (once the spec is stable and SGML software adopts it).
  422. </PARA></LISTITEM></ITEMIZEDLIST></SECT2>
  423. <SECT2 ID="faq-browser"><TITLE>Where can I get an XML browser?</TITLE>
  424. <PARA REVISIONFLAG="CHANGED">There are already some browsers emerging,
  425. but the
  426. <LINK LINKEND="faq-spec">XML specification</LINK> is still new. As with
  427. <LINK LINKEND="faq-html">HTML</LINK>, there won't be just one
  428. browser, but many. However, because the potential number of different
  429. XML applications is not limited, no single browser should be expected to
  430. handle 100% of everything.</PARA>
  431. <PARA>The generic parts of XML (<FOREIGNPHRASE>eg</FOREIGNPHRASE>
  432. parsing, tree management, searching, formatting, <FOREIGNPHRASE>etc</FOREIGNPHRASE>)
  433. are being combined into general-purpose browser libraries or toolkits to
  434. make it easier for <LINK LINKEND="faq-developer">developers</LINK> to
  435. take a consistent line when writing XML applications. Such applications
  436. could then be customized by adding semantics for specific markets, or
  437. using languages like
  438. <PRODUCTNAME REMAP="ULINK" XREFLABEL="http://www.sun.com/">Java</PRODUCTNAME>
  439. to develop plugins for generic browsers and have the specialist modules
  440. delivered transparently over the Web.</PARA>
  441. <PARA REVISIONFLAG="CHANGED">Netscape and Microsoft are both now
  442. developing XML facilities: some development work at Microsoft can be
  443. seen at <FILENAME><ULINK
  444. URL="http://www.microsoft.com/msdn/sdk/inetsdk/help/">http://www.microsoft.com/msdn/sdk/inetsdk/help/</ULINK></FILENAME>.
  445. The status at Netscape is unknown to me.</PARA>
  446. <PARA REVISIONFLAG="CHANGED">See also the notes on software for
  447. <LINK LINKEND="faq-xmlsoft">authors</LINK> and <LINK LINKEND="faq-api">developers</LINK>,
  448. and the more detailed list on the XML pages in the SGML Web site at 
  449. <FILENAME><ULINK URL="http://www.sil.org/sgml/xml.html">http://www.sil.org/sgml/xml.html</ULINK></FILENAME>.</PARA></SECT2>
  450. <SECT2 ID="faq-switch"><TITLE>Do I have to switch from SGML or HTML to
  451. XML?</TITLE>
  452. <PARA>No, existing <LINK LINKEND="faq-sgml">SGML</LINK> and
  453. <LINK LINKEND="faq-html">HTML</LINK> applications software will
  454. continue to work with existing files. But as with any enhanced facility,
  455. if you want to view or download and use XML files, you will need to add
  456. XML-aware software when it becomes available.</PARA></SECT2></SECT1>
  457. <SECT1 ID="faq-author"><TITLE>Authors of SGML (including writers of
  458. HTML)</TITLE>
  459. <NOTE><PARA>Authors should also read the
  460. <LINK LINKEND="faq-developer">Developers' Section</LINK>, which
  461. contains further information about the internals of XML files.</PARA></NOTE>
  462. <SECT2 ID="faq-replace"><TITLE>Does XML replace HTML?</TITLE>
  463. <PARA>No, XML itself does not replace
  464. <LINK LINKEND="faq-html">HTML</LINK>: instead, it provides an
  465. alternative by allowing you to define your own set of markup elements.
  466. HTML is expected to remain in common use for some time to come, and DTDs
  467. will be available in XML versions as well as the original SGML versions.
  468. XML is designed to make the writing of DTDs much simpler than with full
  469. <LINK LINKEND="faq-sgml">SGML</LINK>.</PARA>
  470. <PARA>Work is going on to produce XML versions of HTML and other
  471. popular DTDs, but this may not take off until the specification for XML
  472. 1.0 is complete (targeted November 1997). Watch
  473. <SYSTEMITEM>comp.text.sgml</SYSTEMITEM> and <SYSTEMITEM>XML-L</SYSTEMITEM>
  474. for announcements.</PARA></SECT2>
  475. <SECT2 ID="faq-xmldoc"><TITLE>What does an XML document look like
  476. inside?</TITLE>
  477. <PARA>The basic structure is very similar to most other applications of
  478. SGML, including HTML. XML documents can be very simple, with no document
  479. type declaration, and straightforward nested markup of your own design:</PARA>
  480. <PROGRAMLISTING><LINK LINKEND="faq-rmdpi"><?XML version="1.0" standalone="yes"?></LINK>
  481. <conversation>
  482.   <greeting><PROPERTY>Hello, world!</PROPERTY></greeting>
  483.   <response><PROPERTY>Stop the planet, I want to get off!</PROPERTY></response>
  484. </conversation></PROGRAMLISTING>
  485. <PARA>Or they can be more complicated, with a DTD specified, and maybe
  486. an internal subset, and a more complex structure:</PARA>
  487. <PROGRAMLISTING><?XML version="1.0" <LINK LINKEND="faq-rmd">standalone</LINK>="no" encoding="UTF-8"?>
  488. <!<LINK LINKEND="faq-doctype">DOCTYPE</LINK> titlepage SYSTEM "http://www.frisket.org/dtds/typo.dtd" 
  489. [<!ENTITY % active.links "INCLUDE">]>
  490. <titlepage>
  491.   <white-space type="vertical" amount="36"/>
  492.   <title font="Baskerville" size="24/30" 
  493.          alignment="centered"><PROPERTY>Hello, world!</PROPERTY></title>
  494.   <white-space type="vertical" amount="12"/>
  495.   <!-- In some copies the following decoration is 
  496.         hand-colored, presumably by the author -->
  497.   <image location="http://www.foo.bar/fleuron.eps" type="URL" alignment="centered"/>
  498.   <white-space type="vertical" amount="24"/>
  499.   <author font="Baskerville" size="18/22" style="italic"><PROPERTY
  500. MOREINFO="REFENTRY">Munde Salutem</PROPERTY></author>
  501. </titlepage></PROGRAMLISTING>
  502. <PARA>Or they can be anywhere between: a lot will depend on how you
  503. want to define your document type (or whose you use) and what it will be
  504. used for. See the question on <LINK LINKEND="faq-validwf">valid and
  505. well-formed files</LINK>.</PARA></SECT2>
  506. <SECT2 ID="faq-space"><TITLE>How does XML handle white-space in my
  507. documents?</TITLE> 
  508. <PARA>The SGML rules regarding white-space have been changed for XML,
  509. so <EMPHASIS>all</EMPHASIS> white-space, including linebreaks, TAB
  510. characters, and regular spaces, is passed by the parser <EMPHASIS>unchanged</EMPHASIS>
  511. to the application (browser, formatter, viewer,
  512. <FOREIGNPHRASE>etc</FOREIGNPHRASE>). This means:
  513. </PARA>
  514. <ITEMIZEDLIST><LISTITEM><PARA REVISIONFLAG="CHANGED"><WORDASWORD>insignificant</WORDASWORD>
  515. white-space between structural elements (those which can contain only
  516. other elements, not text data, sometimes called <QUOTE>element content</QUOTE>)
  517. <EMPHASIS>will</EMPHASIS> get passed to the application (under
  518. <WORDASWORD>full</WORDASWORD> SGML this white-space is suppressed);</PARA></LISTITEM>
  519. <LISTITEM><PARA REVISIONFLAG="CHANGED"><WORDASWORD>significant</WORDASWORD>
  520. white-space within elements which can contain text and markup mixed
  521. together (<QUOTE>mixed content</QUOTE> or PCDATA [parsed character
  522. data]) will still get passed to the application as before.</PARA></LISTITEM></ITEMIZEDLIST>
  523. <PROGRAMLISTING><chapter>
  524.   <section>
  525.     <title>
  526.       My title for Section 
  527. 1.
  528.     </title>
  529.     <para>
  530.       ...
  531.     </para>
  532.   </section>
  533. </chapter></PROGRAMLISTING>
  534. <PARA>The parser must, however, still inform the application what
  535. white-space occurred in element content, if known.  (Users of <QUOTE>full</QUOTE>
  536. SGML may recognize that this information was not in the
  537. <ULINK URL="http://www.sil.org/sgml/WG8-n931a.html">ESIS</ULINK>, but
  538. it <EMPHASIS>is</EMPHASIS> in the
  539. <ULINK URL="http://www.sil.org/sgml/topics.html#groves">grove</ULINK>.)
  540. In the above example, the application will receive all the
  541. pretty-printing linebreaks, TABs, and spaces between the elements as
  542. well as those embedded in the section title. It is the function of the
  543. application (browser, formatter, viewer,
  544. <FOREIGNPHRASE>etc</FOREIGNPHRASE>) to decide which type of white-space
  545. to discard and which to retain.</PARA></SECT2>
  546. <SECT2 ID="faq-case"><TITLE>Which parts of an XML document are
  547. case-sensitive?</TITLE> 
  548. <PARA REVISIONFLAG="CHANGED">All of an XML file is case-sensitive, both
  549. markup <EMPHASIS>and</EMPHASIS> text. This is significantly different
  550. from HTML and many other SGML document types. It was introduced to allow
  551. markup in non-Latin-alphabet scripts and to obviate problems with
  552. case-folding in scripts which are caseless.</PARA>
  553. <ITEMIZEDLIST><LISTITEM><PARA>Element names (used in start-tags and
  554. end-tags) are case-sensitive: you must stick with whatever combination
  555. of upper- or lower-case you use to define them (either by usage or in a
  556. <LINK LINKEND="faq-dtd">DTD</LINK>);</PARA></LISTITEM>
  557. <LISTITEM><PARA>For well-formed files with no DTD, the <EMPHASIS>first
  558. occurrence</EMPHASIS> of an element name defines the casing. So you can't
  559. say <SGMLTAG CLASS="STARTTAG">BODY</SGMLTAG>…<SGMLTAG
  560. CLASS="ENDTAG">body</SGMLTAG>: upper- and lower-case must match; thus
  561. <SGMLTAG CLASS="ENDTAG" LANG="xml" REMAP="empty">IMG</SGMLTAG> and
  562. <SGMLTAG CLASS="ENDTAG" LANG="xml" REMAP="empty">img</SGMLTAG> are
  563. <EMPHASIS>two different elements</EMPHASIS>;</PARA></LISTITEM>
  564. <LISTITEM><PARA>Attribute names are also case-sensitive, on a
  565. per-element basis: for example
  566. <SGMLTAG CLASS="ENDTAG" LANG="xml" REMAP="empty">PIC width="7in"</SGMLTAG>
  567. and <SGMLTAG CLASS="ENDTAG" LANG="xml" REMAP="empty">PIC WIDTH="6in"</SGMLTAG>
  568. in the same file exhibit two <EMPHASIS>separate</EMPHASIS> attributes,
  569. because the different casings of <SGMLTAG CLASS="ATTRIBUTE">width</SGMLTAG>
  570. and <SGMLTAG CLASS="ATTRIBUTE">WIDTH</SGMLTAG> distinguish them;</PARA>
  571. </LISTITEM>
  572. <LISTITEM><PARA>Attribute values are also case-sensitive. Character
  573. data values (<FOREIGNPHRASE>eg</FOREIGNPHRASE>
  574. <SGMLTAG CLASS="ATTRIBUTE">HRef="MyFile.SGML"</SGMLTAG>) are exactly as
  575. before, but ID and IDREF attributes are case-sensitive and no longer get
  576. folded to uppercase for comparisons;</PARA></LISTITEM>
  577. <LISTITEM><PARA>All entity names (<SGMLTAG CLASS="GENENTITY">Aacute</SGMLTAG>),
  578. and your data content (your text), are case-sensitive, exactly as
  579. before.</PARA></LISTITEM></ITEMIZEDLIST></SECT2> 
  580. <SECT2 ID="faq-exist"><TITLE>How can I make my existing HTML files
  581. work in XML?</TITLE>
  582. <PARA REVISIONFLAG="CHANGED">Make them
  583. <LINK LINKEND="faq-wf">well-formed</LINK> (see below). A DTD is
  584. optional in XML, but HTML files currently have to be DTDless anyway,
  585. because there is no XML version of the HTML DTD yet (<LINK LINKEND="ben">on
  586. its way</LINK>). It is necessary to convert existing HTML files to be
  587. well-formed because XML does not allow end-tag minimization as allowed
  588. in most HTML DTDs. Many HTML authoring tools already produce almost (but
  589. not quite) <EMPHASIS>well-formed</EMPHASIS> XML.</PARA>
  590. <PARA>All XML documents must be well-formed (see below), but a DTD is
  591. optional. HTML files can be converted to a DTD-less form in XML.
  592. However, there cannot be XML versions of current SGML HTML DTDs and .
  593. Many HTML authoring tools already produce almost (but not quite)
  594. well-formed DTD-less XML.</PARA>
  595. <PARA>If you have created your
  596. <LINK LINKEND="faq-html">HTML</LINK> files conforming to one of the
  597. several HTML <LINK LINKEND="faq-dtd">Document Type Definitions (DTDs)</LINK>,
  598. and they validate OK, then they can be converted as follows:</PARA>
  599. <ITEMIZEDLIST><LISTITEM><PARA REVISIONFLAG="CHANGED">replace the
  600. <SGMLTAG>DOCTYPE</SGMLTAG> declaration and any internal subset
  601. (basically everything within the first set of angled brackets <SGMLTAG><!DOCTYPE
  602. HTML...></SGMLTAG>) with the XML Declaration <SYSTEMITEM><?XML
  603. version="1.0" standalone="yes"?></SYSTEMITEM></PARA></LISTITEM>
  604. <LISTITEM><PARA>change any <SGMLTAG>EMPTY</SGMLTAG> elements (<FOREIGNPHRASE>eg</FOREIGNPHRASE>
  605. <SGMLTAG CLASS="ELEMENT">ISINDEX</SGMLTAG>, <SGMLTAG CLASS="ELEMENT">BASE</SGMLTAG>,
  606. <SGMLTAG CLASS="ELEMENT">META</SGMLTAG>, <SGMLTAG CLASS="ELEMENT">LINK</SGMLTAG>,
  607. <SGMLTAG CLASS="ELEMENT">NEXTID</SGMLTAG> and <SGMLTAG CLASS="ELEMENT">RANGE</SGMLTAG>
  608. in the header, and <SGMLTAG CLASS="ELEMENT">IMG</SGMLTAG>,
  609. <SGMLTAG CLASS="ELEMENT">BR</SGMLTAG>, <SGMLTAG CLASS="ELEMENT">HR</SGMLTAG>,
  610. <SGMLTAG CLASS="ELEMENT">FRAME</SGMLTAG>, <SGMLTAG CLASS="ELEMENT">WBR</SGMLTAG>,
  611. <SGMLTAG CLASS="ELEMENT">BASEFONT</SGMLTAG>, <SGMLTAG CLASS="ELEMENT">SPACER</SGMLTAG>,
  612. <SGMLTAG CLASS="ELEMENT">AUDIOSCOPE</SGMLTAG>,
  613. <SGMLTAG CLASS="ELEMENT">AREA</SGMLTAG>, <SGMLTAG CLASS="ELEMENT">PARAM</SGMLTAG>,
  614. <SGMLTAG CLASS="ELEMENT">KEYGEN</SGMLTAG>, <SGMLTAG CLASS="ELEMENT">COL</SGMLTAG>,
  615. <SGMLTAG CLASS="ELEMENT">LIMITTEXT</SGMLTAG>, <SGMLTAG CLASS="ELEMENT">SPOT</SGMLTAG>,
  616. <SGMLTAG CLASS="ELEMENT">TAB</SGMLTAG>, <SGMLTAG CLASS="ELEMENT">OVER</SGMLTAG>,
  617. <SGMLTAG CLASS="ELEMENT">RIGHT</SGMLTAG>, <SGMLTAG CLASS="ELEMENT">LEFT</SGMLTAG>,
  618. <SGMLTAG CLASS="ELEMENT">CHOOSE</SGMLTAG>, <SGMLTAG CLASS="ELEMENT">ATOP</SGMLTAG>,
  619. and <SGMLTAG CLASS="ELEMENT">OF</SGMLTAG> in the body) so that they end
  620. with <QUOTE><SYSTEMITEM>/></SYSTEMITEM></QUOTE>, for example
  621. <SGMLTAG CLASS="ENDTAG" LANG="xml" REMAP="empty">IMG SRC="mypic.gif"
  622. alt="Picture"</SGMLTAG></PARA></LISTITEM>
  623. <LISTITEM><PARA>ensure there are correctly-matched explicit end-tags
  624. for all non-empty elements; <FOREIGNPHRASE>eg</FOREIGNPHRASE> every
  625. <SGMLTAG CLASS="STARTTAG">P</SGMLTAG> must have a
  626. <SGMLTAG CLASS="ENDTAG">P</SGMLTAG>, <FOREIGNPHRASE>etc</FOREIGNPHRASE>:
  627. this can be automated by a normalizer program like <PRODUCTNAME>sgmlnorm</PRODUCTNAME>
  628. (part of <ULINK URL="http://www.jclark.com/sp/"><PRODUCTNAME>SP</PRODUCTNAME></ULINK>)
  629. or a function in an editor like <PRODUCTNAME>Emacs</PRODUCTNAME>/<PRODUCTNAME>psgml</PRODUCTNAME>'s
  630. <SYSTEMITEM>sgml-normalize</SYSTEMITEM>;</PARA></LISTITEM>
  631. <LISTITEM><PARA>escape all markup characters (<SYSTEMITEM><</SYSTEMITEM>
  632. and <SYSTEMITEM>&</SYSTEMITEM>) as <SGMLTAG CLASS="GENENTITY">lt</SGMLTAG>
  633. and <SGMLTAG CLASS="GENENTITY">amp</SGMLTAG></PARA></LISTITEM>
  634. <LISTITEM><PARA>ensure all attribute values are in quotes;</PARA></LISTITEM>
  635. <LISTITEM><PARA>ensure all occurrences of all element names in
  636. start-tags <EMPHASIS>and</EMPHASIS> end-tags match with respect to
  637. upper- and lower-case and that they are consistent throughout the file;</PARA></LISTITEM>
  638. <LISTITEM><PARA>ensure all attribute names are similarly in a
  639. consistent case throughout the file.</PARA></LISTITEM></ITEMIZEDLIST>
  640. <PARA>Be aware that many HTML browsers may not accept XML-style
  641. <SGMLTAG>EMPTY</SGMLTAG> elements with the trailing slash, so the above
  642. changes are not backwards-compatible. An alternative is to add a dummy
  643. end-tag to all <SGMLTAG>EMPTY</SGMLTAG> elements, so
  644. <SGMLTAG CLASS="STARTTAG">IMG</SGMLTAG> becomes
  645. <SGMLTAG CLASS="STARTTAG">IMG</SGMLTAG><SGMLTAG CLASS="ENDTAG">IMG</SGMLTAG>.</PARA>
  646. <PARA>If you have a lot of valid HTML files, you could write a script
  647. in an SGML conversion system to do this (such as
  648. <PRODUCTNAME><ULINK URL="http://www.omnimark.com">Omnimark</ULINK></PRODUCTNAME>,
  649. <PRODUCTNAME><ULINK URL="http://www.balise.com">Balise</ULINK></PRODUCTNAME>,
  650. <PRODUCTNAME><ULINK URL="http://www.dircon.co.uk/sgml">SGMLC</ULINK></PRODUCTNAME>,
  651. or a system using one of the SGML <PRODUCTNAME>Perl</PRODUCTNAME>
  652. libraries), or you could even use edit macros if you know what you're
  653. doing.</PARA>
  654. <PARA>If your HTML files are invalid then they will almost certainly
  655. have to be converted manually, although if the deformities are regular
  656. and carefully constructed, the files may actually be almost well-formed,
  657. and you could write a program or script to do as described above. To
  658. test for invalidity and non-conformance, check the following:</PARA>
  659. <ITEMIZEDLIST><LISTITEM><PARA REVISIONFLAG="CHANGED">do the files
  660. contain markup syntax errors? For example, are there any backslashes
  661. instead of forward slashes on end-tags; or elements which nest
  662. incorrectly (<FOREIGNPHRASE>eg</FOREIGNPHRASE> <MARKUP><SAMP>an
  663. element which starts <EM>inside one element</SAMP> but ends
  664. outside it</EM></MARKUP>)?</PARA> </LISTITEM>
  665. <LISTITEM><PARA>do the files contain markup which conflicts with the
  666. HTML DTDs, such as headings inside list items, or list items outside
  667. list environments?</PARA></LISTITEM>
  668. <LISTITEM><PARA REVISIONFLAG="CHANGED">do the files use elements which
  669. are not in any DTD? Although this is easy to transform to a DTDless
  670. well-formed file (because you don't have to define elements in
  671. advance) most proprietary [browser-specific] extensions have never been
  672. formally defined, so it is often impossible to work out where they can
  673. meaningfully be used.</PARA></LISTITEM></ITEMIZEDLIST>
  674. <PARA>Markup which is valid but which is meaningless or void may need
  675. to be edited out before conversion (such as repeated empty paragraphs or
  676. linebreaks, empty tables, invisible
  677. <WORDASWORD>spacing</WORDASWORD> GIFs <FOREIGNPHRASE>etc</FOREIGNPHRASE>:
  678. XML uses stylesheets, so you won't need any of these)
  679. </PARA>
  680. <PARA>See the <LINK LINKEND="faq-wf">rules for
  681. <WORDASWORD>well-formed</WORDASWORD> XML files</LINK> for details of
  682. what you need to check in XML when converting.</PARA>
  683. <PARA>Note there are XML versions of the HTML DTD in preparation:</PARA>
  684. <ITEMIZEDLIST><LISTITEM ID="ben"><PARA><ULINK
  685. URL="mailto:btrafford@worldnet.att.net">Ben Trafford</ULINK> is
  686. developing an XML version of HTML 4.2</PARA></LISTITEM>
  687. <LISTITEM><PARA>[details of others sought: please contact the
  688. <ULINK URL="mailto:pflynn@m-net.arbornet.org">editor</ULINK>]</PARA></LISTITEM></ITEMIZEDLIST></SECT2>
  689. <SECT2 ID="faq-subset"><TITLE>If XML is just a subset of SGML, can I
  690. use XML files directly with SGML tools?</TITLE>
  691. <PARA>Yes, provided: <ITEMIZEDLIST>
  692. <LISTITEM><PARA>the document has a valid <LINK LINKEND="faq-dtd">Document
  693. Type Definition (DTD)</LINK>, <FOREIGNPHRASE>ie</FOREIGNPHRASE> the
  694. files are <LINK LINKEND="faq-valid">valid</LINK>, not just
  695. <LINK LINKEND="faq-wf">well-formed</LINK>; and</PARA></LISTITEM>
  696. <LISTITEM><PARA>you use software which knows about the features needed
  697. to support XML, such as the special form for <SGMLTAG>EMPTY</SGMLTAG>
  698. elements; some aspects of the SGML Declaration such as <SGMLTAG>NAMECASE
  699. GENERAL NO</SGMLTAG>; multiple attribute declarations.</PARA></LISTITEM></ITEMIZEDLIST></PARA>
  700. <PARA>At the moment there are few tools which handle XML files
  701. unchanged because of the format of these <SGMLTAG>EMPTY</SGMLTAG>
  702. elements, but this is changing. The <PRODUCTNAME>nsgmls</PRODUCTNAME>
  703. parser has an experimental XML conformance switch, and the first
  704. XML-specific editors and parsers are appearing (see the question on
  705. <LINK LINKEND="faq-xmlsoft">software</LINK>).</PARA>
  706. <PARA>The rules of ISO 8879 are up for minor amendments, some of which
  707. are to facilitate changes needed for Web-enablement.</PARA></SECT2>
  708. <SECT2 ID="faq-learn"><TITLE>I'm used to authoring and serving
  709. HTML. Can I learn XML easily?</TITLE>
  710. <PARA>Yes, very easily, but at the moment there is still a need for
  711. tutorials, simple tools, and more examples of XML documents.
  712. <LINK LINKEND="faq-wf">Well-formed</LINK> XML documents may look
  713. similar to <LINK LINKEND="faq-html">HTML</LINK> except for some small
  714. but very important points of syntax.</PARA>
  715. <PARA>As every user community can have their own document type defined,
  716. it should be much easier to learn, because element names can be picked
  717. for relevance.</PARA></SECT2>
  718. <SECT2 ID="faq-charents"><TITLE>Will XML be able to use non-Latin
  719. characters?</TITLE>
  720. <PARA>Yes, the <LINK LINKEND="faq-spec">XML Specification</LINK>
  721. explicitly says XML uses
  722. <ULINK URL="http://www.iso.ch/">ISO 10646</ULINK>, the international
  723. standard 31-bit character repertoire which covers most human (and some
  724. non-human) written languages. This is currently congruent with Unicode.</PARA>
  725. <PARA REVISIONFLAG="CHANGED">The spec says (2.2): <QUOTE>All XML
  726. processors must accept the UTF-8 and UTF-16 encodings of ISO 10646…</QUOTE>.
  727. UTF-8 is an encoding of Unicode into 8-bit characters: the first 128 are
  728. the same as ASCII, the rest are used to encode the rest of Unicode into
  729. sequences of between 2 and 6 bytes. UTF-8 in its single-octet form is
  730. therefore the same as ISO 646 IRV (ASCII), so you can continue to use
  731. ASCII for English or other unaccented languages using the Latin
  732. alphabet. Note that UTF-8 is incompatible with ISO 8859-1 (ISO Latin-1)
  733. after code point 126 decimal (the end of ASCII). UTF-16 is like UTF-8
  734. but with a scheme to represent the next 16 planes of 64k characters as
  735. two 16-bit characters.</PARA>
  736. <PARA><QUOTE>…the mechanisms for signalling which of the two
  737. are in use, and for bringing other encodings into play, are […]
  738. in the discussion of character encodings.</QUOTE> The
  739. <LINK LINKEND="faq-spec">XML Specification</LINK> explains how to
  740. specify in your XML file which coded character set you are using.</PARA>
  741. <PARA REVISIONFLAG="CHANGED">Use of UCS-4 can only legally be specified
  742. in SGML or XML when the pending <WORDASWORD>WebSGML Adaptations</WORDASWORD>
  743. to ISO 8879 come into force to enable numbers longer than eight digits
  744. to be used in the SGML Declaration.</PARA>
  745. <PARA REVISIONFLAG="CHANGED"><QUOTE>Regardless of the specific
  746. encoding used, any character in the ISO 10646 character set may be
  747. referred to by the decimal or hexadecimal equivalent of its bit string</QUOTE>:
  748. so no matter which character set you personally use, you can still refer
  749. to specific individual characters from elsewhere in the encoded
  750. repertoire by using <SGMLTAG CLASS="NUMCHARREF"><REPLACEABLE>dddd</REPLACEABLE></SGMLTAG>
  751. (decimal character code) or
  752. <SGMLTAG CLASS="NUMCHARREF">U<REPLACEABLE>HHHH</REPLACEABLE></SGMLTAG>
  753. (hexadecimal character code, in uppercase).</PARA>
  754. <PARA>The terminology can get confusing, as can the numbers: see the
  755. <ULINK
  756. URL="http://cns-web.bu.edu/pub/djohnson/web_files/i18n/ISO-10646.html">ISO
  757. 10646 Concept Dictionary</ULINK>.</PARA></SECT2>
  758. <SECT2 ID="faq-doctype"><TITLE>What's a Document Type Definition
  759. (DTD) and where do I get one?</TITLE>
  760. <PARA>A DTD is usually a file (or several files to be used together)
  761. which contains a formal definition of a particular type of document.
  762. This sets out what names can be used for elements, where they may occur,
  763. and how they all fit together. For example, if you want a document type
  764. to describe <SGMLTAG CLASS="ELEMENT">LIST</SGMLTAG>s which contain
  765. <SGMLTAG CLASS="ELEMENT">ITEM</SGMLTAG>s, part of your DTD would
  766. contain something like<PROGRAMLISTING><!ELEMENT item (#pcdata)>
  767. <!ELEMENT list (item)+></PROGRAMLISTING>This defines items containing
  768. text, and lists containing items. It's a formal language which lets
  769. processors automatically parse a document and identify where every
  770. element comes and how they relate to each other, so that stylesheets,
  771. navigators, browsers, search engines, databases, printing routines, and
  772. other applications can be used.</PARA>
  773. <PARA>[Note that in XML, there are no minimization parameters (<QUOTE><SYSTEMITEM>-</SYSTEMITEM></QUOTE>
  774. and <QUOTE><SYSTEMITEM>O</SYSTEMITEM></QUOTE> characters in element
  775. definitions between element name and content model), because all
  776. elements except empty ones must have both start-tag and end-tag present
  777. at all times.]</PARA>
  778. <PARA ID="faq-selfdef">There are thousands of SGML DTDs already in
  779. existence in all kinds of areas (see the
  780. <ULINK URL="http://www.sil.org/sgml/sgml.html">SGML Web pages</ULINK>
  781. for examples). Many of them can be downloaded and used freely; or you
  782. can write your own. As with any language, you need to learn it to do
  783. this: but XML is much simpler than full SGML: see the
  784. <LINK LINKEND="faq-restrict">list of restrictions</LINK> which shows
  785. what has been cut out. Existing SGML DTDs need to be converted to XML
  786. for use with XML systems: expect to see announcements soon of popular
  787. DTDs becoming available in XML format.</PARA></SECT2>
  788. <SECT2 ID="faq-hypertext"><TITLE>How will XML affect my document
  789. links?</TITLE>
  790. <PARA><LINK LINKEND="tei-link">The linking abilities of XML systems</LINK>
  791. are much more powerful than those of HTML, so you'll be able to do
  792. much more with them. Existing
  793. <MARKUP>HREF</MARKUP>-style links will remain usable, but new linking
  794. technology is based on the lessons learned in the development of other
  795. standards involving hypertext, such as
  796. <ULINK URL="http://www-tei.uic.edu/orgs/tei/">TEI</ULINK> and
  797. <ULINK URL="http://www.sil.org/sgml/">HyTime</ULINK>, which let you
  798. manage bidirectional and multi-way links, as well as links to a span of
  799. text (within your own or other documents) rather than to a single point.
  800. This is already implemented for SGML in browsers like
  801. <PRODUCTNAME>Panorama</PRODUCTNAME> and <PRODUCTNAME>Multidoc Pro</PRODUCTNAME>.</PARA>
  802. <PARA>The
  803. <ULINK URL="http://www.w3.org/TR/WD-xml-link">XML Linking Specification
  804. (XLL)</ULINK> document contains a detailed specification. An XML link
  805. can be either a URL or a TEI-style Extended Pointer (<WORDASWORD><LINK
  806. LINKEND="tei-link">Xptr</LINK></WORDASWORD>), or both. A URL on its own
  807. is assumed to be a resource (as with HTML); if an Xptr follows it, it is
  808. assumed to be a sub-resource of that URL; an Xptr on its own is assumed
  809. to apply to the current document.</PARA>
  810. <PARA>An Xptr is always preceded by one of
  811. <FILENAME>#</FILENAME>, <FILENAME>?</FILENAME>, or <FILENAME>|</FILENAME>.
  812. The <FILENAME>#</FILENAME> and <FILENAME>?</FILENAME> mean the same as
  813. in HTML applications; the <FILENAME>|</FILENAME> means the sub-resource
  814. can be found by applying the Xptr to the resource, but the method of
  815. doing this is left to the application.</PARA>
  816. <PARA>The
  817. <ULINK URL="http://etext.virginia.edu/bin/tei-tocs?div=DIV2&id=SAXR">TEI
  818. Extended Pointer Notation</ULINK> (EPN) is much more powerful than the
  819. <WORDASWORD>fragment address</WORDASWORD> on the end of some URLs.
  820. <LINK LINKEND="faq-hypertext" ID="tei-link">For example, the word
  821. <WORDASWORD>Xptr</WORDASWORD> two paragraphs back could be referred to
  822. as <SYSTEMITEM>http://www.ucc.ie/xml/faq.sgml#ID(faq-hypertext)CHILD(2,*)(4,*)</SYSTEMITEM>,
  823. meaning the fourth child object within the second child object after the
  824. element whose ID is <FILENAME>faq-hypertext</FILENAME>.</LINK> Count
  825. the objects from the start of this question in the
  826. <ULINK URL="faq.sgml">SGML version</ULINK> (which has the ID <QUOTE><SYSTEMITEM>faq-hypertext</SYSTEMITEM></QUOTE>):</PARA>
  827. <ORDEREDLIST><LISTITEM><PARA>the title of the question;</PARA>
  828. <PROGRAMLISTING><SECT2 ID="faq-hypertext">
  829. <TITLE>How will XML affect my document links?</TITLE>
  830. </PROGRAMLISTING></LISTITEM> 
  831. <LISTITEM><PARA>the second  paragraph:</PARA>
  832. <ORDEREDLIST><LISTITEM><PARA>the character data from the start of the
  833. paragraph to the first item of markup:</PARA>
  834. <PROGRAMLISTING><PARA>The</PROGRAMLISTING></LISTITEM>
  835. <LISTITEM><PARA>the markup item:</PARA>
  836. <PROGRAMLISTING><ULINK URL="http://www.w3.org/TR/WD-xml-link">XML Linking 
  837. Specification (XLL)</ULINK></PROGRAMLISTING></LISTITEM>
  838. <LISTITEM><PARA>the next stretch of character data:</PARA>
  839. <PROGRAMLISTING>document contains a detailed specification. An XML link can 
  840. be either a URL or a TEI-style Extended Pointer (</PROGRAMLISTING></LISTITEM>
  841. <LISTITEM><PARA>the next markup item:</PARA>
  842. <PROGRAMLISTING><LINK LINKEND="tei-link">Xptr</LINK></PROGRAMLISTING></LISTITEM></ORDEREDLIST></LISTITEM></ORDEREDLIST>
  843. <PARA>If you view this file with <PRODUCTNAME>Panorama</PRODUCTNAME>
  844. or
  845. <PRODUCTNAME>MultiDoc Pro</PRODUCTNAME> you can click on the
  846. highlighted cross-reference button at the start of the example sentence,
  847. and it will display the locations in Extended Pointer Notation of all
  848. the links to it, including the word <QUOTE>Xptr</QUOTE> mentioned.
  849. (Doing this in an HTML browser is not meaningful, as they do not support
  850. bidirectional linking or EPN.)</PARA></SECT2>
  851. <SECT2 ID="faq-math"><TITLE>Can I do mathematics using XML?</TITLE>
  852. <PARA>Yes, if the <LINK LINKEND="faq-doctype">document type</LINK> you
  853. use provides for math. The mathematics-using community is developing
  854. software, and there is a <ULINK URL="http://www.w3.org/Math/">MathML
  855. proposal at the W3C</ULINK>, which is a native XML application. It would
  856. also be possible to make XML fragments from the long-expired HTML3,
  857. <ULINK URL="http://www.arbornet.org/~silmaril/dtds/html/htmlpro.html">HTML
  858. Pro</ULINK>, or
  859. <ULINK URL="http://www.sil.org/sgml/gen-apps.html#iso12083DTDs">ISO
  860. 12083 Math</ULINK>, or <ULINK URL="http://www.can.nl/~abbott/OpenMath/">OpenMath</ULINK>,
  861. or one of your own making. Browsers which display simple math embedded
  862. in SGML already exist (<FOREIGNPHRASE>eg</FOREIGNPHRASE>
  863. <PRODUCTNAME>Panorama</PRODUCTNAME>,
  864. <PRODUCTNAME>Multidoc Pro</PRODUCTNAME>).</PARA>
  865. <PARA>The sophistication could vary from math expressions like
  866. <INFORMALEQUATION><MATH POSITION="INLINE"><I>x</I><SUB CLASS="char"><I>i</I></SUB></MATH></INFORMALEQUATION>
  867. through simple inline equations such as <INFORMALEQUATION><MATH
  868. POSITION="INLINE"><I>E</I> = <I>mc</I><SUP>2</SUP></MATH></INFORMALEQUATION>
  869. to display equations like<EQUATION>
  870. <MATH POSITION="DISPLAY"><BOX><ABOVE><FONT SIZE="+2" FACE="Symbol">S</FONT><SUP><I>n</I></SUP><SUB><I>i</I>=1</SUB>  (<I>x</I><SUB><I>i</I></SUB> - <FONT
  871. FACE="Symbol">p</FONT>)<SUP>2</SUP></ABOVE><OVER><BELOW><I>n</I></BELOW></BOX></MATH></EQUATION>(If
  872. you are using an HTML browser to read this, the above equations may not
  873. be rendered correctly unless you have a math plugin for <PRODUCTNAME>Netscape</PRODUCTNAME>
  874. like IBM's <PRODUCTNAME><ULINK
  875. URL="http://www.ics.raleigh.ibm.com/ics/techexp.htm">TechExplorer</ULINK></PRODUCTNAME>
  876. which reads the embedded &TeX; equivalent.</PARA></SECT2>
  877. <SECT2 ID="faq-meta"><TITLE>How does XML handle metadata?</TITLE>
  878. <PARA>Because XML lets you define your own markup language, you can
  879. make full use of the extended hypertext features (see the question on
  880. <LINK LINKEND="faq-hypertext">Links</LINK>) of XML to store or link to
  881. metadata in any format (<FOREIGNPHRASE>eg</FOREIGNPHRASE>
  882. <ULINK URL="http://www2.sub.uni-goettingen.de/dc-wf.html">Dublin Core,
  883. Warwick Framework</ULINK>, <ULINK URL="http://www.dstc.edu.au/RDU/RDF/">Resource
  884. Description Framework (RDF)</ULINK>, and
  885. <ULINK URL="http://www.w3.org/PICS/">Platform for Internet Content
  886. Selection (PICS)</ULINK>).</PARA>
  887. <PARA>There are no predefined elements in XML, because it is an
  888. architecture, not an application, so it is not part of XML's job to
  889. specify how or if authors should or should not implement metadata. You
  890. are therefore free to use any suitable method from simple attributes to
  891. the embedding of entire Dublin Core/Warwick Framework metadata records.
  892. Browser makers may also have their own architectural recommendations or
  893. methods to propose.</PARA></SECT2>
  894. <SECT2 ID="faq-java"><TITLE>Can I use Java, ActiveX, <FOREIGNPHRASE>etc</FOREIGNPHRASE>
  895. in XML?</TITLE>
  896. <PARA>This depends on what facilities the browser makers implement. XML
  897. is about describing information; scripting languages and languages for
  898. embedded functionality are the software which enables the information to
  899. be manipulated at the user's end.</PARA>
  900. <PARA>XML itself provides a way to define the markup needed to
  901. implement scripting languages: as a neutral standard it neither
  902. encourages not discourages their use, and does not favour one language
  903. over another, so the field is wide open. Developments are ongoing: see
  904. John Tigue's suggestions for
  905. <ULINK URL="http://www.datachannel.com/ChannelWorld/XML/dev/">standardising
  906. the API for Java</ULINK> in respect of XML.</PARA>
  907. <PARA>Scripting languages <EMPHASIS>are</EMPHASIS> provided for in a
  908. proposal for an <ULINK URL="http://www.w3.org/TR/NOTE-XSL-970910">Extensible
  909. Style Language, XSL</ULINK> (see question on <LINK LINKEND="faq-style">Stylesheets</LINK>).</PARA></SECT2>
  910. <SECT2 ID="faq-style"><TITLE>How do I control appearance?</TITLE>
  911. <PARA>The use of a stylesheet is implicit in XML. Some browsers may
  912. possibly provide simple default styles for popular elements like
  913. <SGMLTAG CLASS="ELEMENT">PARA</SGMLTAG>, or <SGMLTAG CLASS="ELEMENT">LIST</SGMLTAG>
  914. containing <SGMLTAG CLASS="ELEMENT">ITEM</SGMLTAG>, but in general a
  915. stylesheet gives the author much better control of the layout. But as
  916. with any system where files can be viewed at random by arbitrary users,
  917. the author cannot know what resources (such as fonts) are on the user's
  918. system, so care is needed.</PARA>
  919. <ITEMIZEDLIST><LISTITEM><PARA>The international standard for
  920. stylesheets for SGML documents is
  921. <ULINK URL="http://www.sil.org/sgml/related.html#dsssl">DSSSL, the
  922. Document Style and Semantics Specification Language</ULINK> (<ULINK
  923. URL="http://www.iso.ch/">ISO 10179</ULINK>). This provides Scheme-like
  924. languages for stylesheets and document conversion, and is extensively
  925. implemented in the <ULINK URL="http://www.jclark.com/jade/"><PRODUCTNAME>Jade</PRODUCTNAME>
  926. formatter</ULINK>.</PARA></LISTITEM>
  927. <LISTITEM><PARA>The <ULINK URL="http://www.w3.org/Style/css">Cascading
  928. Stylesheet Specification (CSS)</ULINK> provides a simple syntax for
  929. assigning styles to elements, and has been implemented in HTML browsers.</PARA></LISTITEM>
  930. <LISTITEM><PARA>The Synex stylesheet DTD as already used in
  931. <PRODUCTNAME>Panorama</PRODUCTNAME> and <PRODUCTNAME>MultiDoc Pro</PRODUCTNAME>;</PARA></LISTITEM>
  932. <LISTITEM><PARA>A new
  933. <ULINK URL="http://www.w3.org/TR/NOTE-XSL-970910">Extensible Style
  934. Language</ULINK>  (XSL) is being proposed for use specifically with XML.
  935. This uses XML syntax (a stylesheet is actually an XML file) and combines
  936. formatting features from both DSSSL and CSS (HTML) and has already
  937. attracted support from several major vendors.</PARA></LISTITEM></ITEMIZEDLIST>
  938. <PARA>It remains to be seen which ones browsers will implement.</PARA></SECT2></SECT1>
  939. <SECT1 ID="faq-developer"><TITLE>Developers and Implementors
  940. (including WebMasters and server operators)</TITLE>
  941. <SECT2 ID="faq-spec"><TITLE>Where's the spec?</TITLE>
  942. <PARA>Right
  943. <ULINK URL="http://www.w3.org/TR/WD-xml">here (<FILENAME
  944. REMAP="ULINK" XREFLABEL="http://www.w3.org/TR/WD-xml">http://www.w3.org/TR/WD-xml</FILENAME>)</ULINK>.
  945. Includes the EBNF. There's also a
  946. <ULINK URL="http://www.fxis.co.jp/DMS/sgml/xml/wd-xml-lang.html">version
  947. in Japanese at <FILENAME>http://www.fxis.co.jp/DMS/sgml/xml/wd-xml-lang.html</FILENAME></ULINK>
  948. and <ULINK URL="http://www.fxis.co.jp/DMS/sgml/xml/wd-xml-link.html"><FILENAME>http://www.fxis.co.jp/DMS/sgml/xml/wd-xml-link.html</FILENAME></ULINK>.</PARA></SECT2>
  949. <SECT2 ID="faq-validwf"><TITLE>What are these terms <WORDASWORD>DTDless</WORDASWORD>,
  950. <WORDASWORD>valid</WORDASWORD>, and <WORDASWORD>well-formed</WORDASWORD>?</TITLE>
  951.  
  952. <PARA>Full SGML uses a Document Type Definition (DTD) to describe the
  953. markup (elements) available in any specific type of document. However,
  954. the design and construction of a DTD can be a complex and non-trivial
  955. task, so XML has been designed so it can be used either with or without
  956. a DTD. DTDless operation means you can invent markup without having to
  957. define it formally.</PARA>
  958. <PARA>To make this work, a DTDless file in effect <WORDASWORD>defines</WORDASWORD>
  959. its own markup, informally, by the existence and location of elements
  960. where you create them. But when an XML application such as a browser
  961. encounters a DTDless file, it needs to be able to understand the
  962. document structure as it reads it, because it has no DTD to tell it what
  963. to expect, so some changes have been made to the rules. </PARA>
  964. <PARA>For example, HTML's <SGMLTAG CLASS="ELEMENT">IMG</SGMLTAG>
  965. element is defined as <QUOTE><SGMLTAG>EMPTY</SGMLTAG></QUOTE>: it
  966. doesn't have an end-tag. Without a DTD, an XML application would
  967. have no way to know whether or not to expect an end-tag for an element,
  968. so the concept of <WORDASWORD>well-formed</WORDASWORD> has been
  969. introduced. This makes the start and end of every element, and the
  970. occurrence of <SGMLTAG>EMPTY</SGMLTAG> elements completely unambiguous.</PARA>
  971. <SECT3 ID="faq-wf"><TITLE><QUOTE>Well-formed</QUOTE> documents</TITLE>
  972. <PARA>All XML documents must be well-formed:</PARA>
  973. <ITEMIZEDLIST><LISTITEM ID="faq-rmd"><PARA
  974. ID="faq-rmdpi" REVISIONFLAG="CHANGED">if there is no DTD in use, the
  975. document must start with a <LINK LINKEND="faq-rmd">Standalone Document
  976. Declaration</LINK> (SDD) saying so:<PROGRAMLISTING><?XML version="1.0" standalone="yes"?>
  977. <foo>
  978.   <bar>...<blort/>...</bar>
  979. </foo></PROGRAMLISTING></PARA>
  980. </LISTITEM>
  981. <LISTITEM><PARA>all tags must be balanced: that is, all elements which
  982. may contain character data must have both start- and end-tags present
  983. (omission is not allowed except for
  984. <LINK LINKEND="faq-empty">empty elements</LINK>, see below);</PARA></LISTITEM>
  985. <LISTITEM><PARA>all attribute values must be in quotes (the
  986. single-quote character [the apostrophe] may be used if the value
  987. contains a double-quote character, and <FOREIGNPHRASE>vice versa</FOREIGNPHRASE>):
  988. if you need both, use <SGMLTAG CLASS="GENENTITY">apos</SGMLTAG> and
  989. <SGMLTAG CLASS="GENENTITY">quot</SGMLTAG></PARA></LISTITEM>
  990. <LISTITEM><PARA ID="faq-empty">any <MARKUP>EMPTY</MARKUP> element
  991. tags (<FOREIGNPHRASE>eg</FOREIGNPHRASE> those with no end-tag like HTML's
  992. <SGMLTAG CLASS="ELEMENT">IMG</SGMLTAG>,
  993. <SGMLTAG CLASS="ELEMENT">HR</SGMLTAG>, and <SGMLTAG CLASS="ELEMENT">BR</SGMLTAG>
  994. and others) must either end with <QUOTE><MARKUP>/></MARKUP></QUOTE>
  995. or you have to make them non-<MARKUP>EMPTY</MARKUP> by adding a real
  996. end-tag;</PARA>
  997. <PARA>Example:
  998. <SGMLTAG CLASS="ELEMENT">BR</SGMLTAG> would become either
  999. <SGMLTAG CLASS="ENDTAG" LANG="xml" REMAP="empty">BR</SGMLTAG> or
  1000. <SGMLTAG CLASS="STARTTAG">BR</SGMLTAG><SGMLTAG CLASS="ENDTAG">BR</SGMLTAG>.</PARA></LISTITEM>
  1001. <LISTITEM><PARA REVISIONFLAG="CHANGED">there must not be any isolated
  1002. markup characters (<MARKUP><</MARKUP> or <MARKUP>&</MARKUP>) in
  1003. your text data (<FOREIGNPHRASE>ie</FOREIGNPHRASE> they must be given as
  1004. <SGMLTAG CLASS="GENENTITY">lt</SGMLTAG> and
  1005. <SGMLTAG CLASS="GENENTITY">amp</SGMLTAG>), and the sequence
  1006. <SYSTEMITEM>]]></SYSTEMITEM> must be given as <SYSTEMITEM>]]&gt;</SYSTEMITEM>
  1007. if it does not occur as the end of a <SGMLTAG>CDATA</SGMLTAG> marked
  1008. section;</PARA></LISTITEM>
  1009. <LISTITEM><PARA>elements must nest inside each other properly (no
  1010. overlapping markup, same rule as for all SGML);</PARA></LISTITEM>
  1011. <LISTITEM><PARA>Well-formed files with no DTD may use attributes on
  1012. any element, but the attributes must all be of type CDATA by default.</PARA></LISTITEM></ITEMIZEDLIST>
  1013. <PARA>Well-formed XML files with no DTD are considered to have
  1014. <SGMLTAG CLASS="GENENTITY">lt</SGMLTAG>, <SGMLTAG CLASS="GENENTITY">gt</SGMLTAG>,
  1015. <SGMLTAG CLASS="GENENTITY">apos</SGMLTAG>,
  1016. <SGMLTAG CLASS="GENENTITY">quot</SGMLTAG>, and
  1017. <SGMLTAG CLASS="GENENTITY">amp</SGMLTAG> predefined and thus available
  1018. for use even without a DTD.  Valid XML files must declare them
  1019. explicitly if they use them.</PARA>
  1020. </SECT3>
  1021. <SECT3 ID="faq-valid"><TITLE>Valid XML</TITLE>
  1022. <PARA ID="faq-docdec">Valid XML files are those which have a
  1023. <LINK LINKEND="faq-dtd">Document Type Definition (DTD)</LINK> like all
  1024. other <LINK LINKEND="faq-sgml">SGML</LINK> applications, and which
  1025. adhere to it. <EMPHASIS>They must also be <LINK LINKEND="faq-wf">well-formed</LINK></EMPHASIS>.</PARA>
  1026. <PARA>A valid file begins like any other SGML file with a Document Type
  1027. Declaration, but may have an optional XML Declaration prepended:<PROGRAMLISTING><?XML version="1.0"?>
  1028. <!DOCTYPE advert SYSTEM "http://www.foo.org/ad.dtd">
  1029. <advert>
  1030.   <headline>...<pic/>...</headline>
  1031.   <text>...</text>
  1032. </advert></PROGRAMLISTING>The <LINK LINKEND="faq-spec">XML
  1033. Specification</LINK> defines an <ULINK URL="sgmlxml.decl">SGML
  1034. Declaration for XML</ULINK> which is fixed for all instances. An
  1035. <LINK LINKEND="faq-dtd">XML version</LINK> of the specified DTD must be
  1036. accessible to the XML processor, either by being available locally (<FOREIGNPHRASE>ie</FOREIGNPHRASE>
  1037. the user already has a copy on disk), or by being retrievable via the
  1038. network. You can enable this by supplying the URL for the DTD in a
  1039. System Identifier (as in the example above). It is possible (some people
  1040. would say preferable) to supply a
  1041. <ULINK URL="http://www.ucc.ie/cgi-bin/public">Formal Public Identifier</ULINK>,
  1042. but if used, this must be <EMPHASIS>precede</EMPHASIS> the System
  1043. Identifier, which must still be given:<PROGRAMLISTING><!DOCTYPE advert PUBLIC "-//Foo, Inc//DTD Advertisements//EN" "http://www.foo.org/ad.dtd"></PROGRAMLISTING></PARA>
  1044. <PARA>The defaults for the other attributes of the XML Declaration are
  1045. <SGMLTAG>VERSION="1.0"</SGMLTAG> and <SGMLTAG CLASS="ATTRIBUTE">ENCODING="UTF-8"</SGMLTAG>.</PARA></SECT3></SECT2>
  1046. <SECT2 ID="faq-dtd"><TITLE>What else has changed between SGML and XML?</TITLE>
  1047. <PARA ID="faq-restrict">The principal changes are in what you can do in
  1048. writing a Document Type Definition (DTD). To simplify the syntax and
  1049. make it easier to write processing software, a large number of markup
  1050. declaration options have been suppressed (see Appendix A of
  1051. <LINK LINKEND="faq-spec">the XML Specification</LINK>).</PARA>
  1052. <PARA>A new delimiter is permitted in Names (the colon) for use in
  1053. experiments with namespaces (enabling DTDs to distinguish element
  1054. source, ownership, or application). A colon may only appear in mid-name,
  1055. though, not at the start or the end, and the syntax may change in a
  1056. future version.</PARA>
  1057. </SECT2>
  1058. <SECT2 ID="faq-xmlsoft"><TITLE>What XML software can I use today?</TITLE>
  1059. <PARA REVISIONFLAG="ADDED">Details have been removed as they are now
  1060. changing too rapidly to be duplicated in this FAQ: see the XML pages at
  1061. <FILENAME><ULINK URL="http://www.sil.org/sgml/xml.html">http://www.sil.org/sgml/xml.html</ULINK></FILENAME>.</PARA>
  1062. <PARA>For browsers see the question on
  1063. <LINK LINKEND="faq-browser">XML Browsers</LINK> and the details of the
  1064. <LINK LINKEND="faq-mailinglist"><FILENAME>xml-dev</FILENAME> mailing
  1065. list</LINK> for software developers. Bert Bos keeps
  1066. <ULINK URL="http://www.w3.org/XML/notes.html">a list of some XML
  1067. developments</ULINK> in bison, flex, perl and Python.</PARA></SECT2>
  1068. <SECT2 ID="faq-swchx"><TITLE>Do I have to change any of my server
  1069. software to work with XML?</TITLE>
  1070. <PARA>Only to serve up <FILENAME>.xml</FILENAME>  files as the correct
  1071. MIME type. MIME types of
  1072. <SYSTEMITEM>text/xml</SYSTEMITEM> and <SYSTEMITEM>text/xsl</SYSTEMITEM>
  1073. are usable, so for serving XML documents all that is needed is to edit
  1074. the
  1075. <FILENAME>mime-types</FILENAME> file (or its equivalent) and add the
  1076. lines<PROGRAMLISTING>text/xml            xml XML
  1077. text/xsl     xsl XSL</PROGRAMLISTING>Since XML is designed to support
  1078. stylesheets and sophisticated hyperlinking, XML documents will be
  1079. accompanied by ancillary files such as DTDs, entity files, catalogs,
  1080. stylesheets, etc, which may need their own MIME entry, and which require
  1081. placing in the appropriate directories. XUA (XML User Agent), which is
  1082. one of the planned deliverables of the XML WG, might provide a mechanism
  1083. for packaging XML documents and XSL styles into a single message.</PARA>
  1084. <PARA>If you run scripts generating HTML, which you wish to work with
  1085. XML, they will need to be modified to produce the relevant document
  1086. type.</PARA></SECT2>
  1087. <SECT2 ID="faq-ssincludes"><TITLE>Can I still use server-side
  1088. <MARKUP>INCLUDE</MARKUP>s?</TITLE>
  1089. <PARA>Yes, so long as what they generate ends up as part of an
  1090. XML-conformant file (<FOREIGNPHRASE>ie</FOREIGNPHRASE> either
  1091. <LINK LINKEND="faq-valid">valid</LINK> or just <LINK LINKEND="faq-wf">well-formed</LINK>).</PARA></SECT2>
  1092. <SECT2 ID="faq-csincludes"><TITLE>Can I (and my authors) still use
  1093. client-side <MARKUP>INCLUDE</MARKUP>s?</TITLE>
  1094. <PARA>The same rule applies as for
  1095. <LINK LINKEND="faq-ssincludes">server-side <MARKUP>INCLUDE</MARKUP>s</LINK>,
  1096. so you need to ensure that any embedded code which gets passed to a
  1097. third-party engine (<FOREIGNPHRASE>eg</FOREIGNPHRASE> <PRODUCTNAME>SDQL</PRODUCTNAME>
  1098. enquiries, <PRODUCTNAME>Java</PRODUCTNAME>
  1099. <MARKUP>write</MARKUP>s, <PRODUCTNAME>LiveWire</PRODUCTNAME> requests,
  1100. streamed content,
  1101. <FOREIGNPHRASE>etc</FOREIGNPHRASE>) does not contain any characters
  1102. which might be misinterpreted as XML markup (<FOREIGNPHRASE>ie</FOREIGNPHRASE>
  1103. no angle brackets or ampersands): either use a <MARKUP>CDATA</MARKUP>
  1104. marked section to avoid your XML application parsing the embedded code,
  1105. or use the standard <SGMLTAG CLASS="GENENTITY">lt</SGMLTAG>,
  1106. <SGMLTAG CLASS="GENENTITY">gt</SGMLTAG>, and
  1107. <SGMLTAG CLASS="GENENTITY">amp</SGMLTAG> character entity references
  1108. instead.</PARA></SECT2>
  1109. <SECT2 ID="faq-terms"><TITLE>I'm trying to understand the XML
  1110. Spec: why does SGML (and XML) have such difficult terminology?</TITLE>
  1111. <PARA>For implementation to succeed, the terminology needs to be
  1112. precise.</PARA>
  1113. <PARA>Example: <WORDASWORD>element</WORDASWORD> and
  1114. <WORDASWORD>tag</WORDASWORD> are not synonymous: an element is a whole
  1115. unit of information with its markup, and may consist of a start-tag
  1116. alone (as in HTML's
  1117. <SGMLTAG CLASS="STARTTAG">BR</SGMLTAG>) or a start-tag and an end-tag
  1118. <EMPHASIS>and the content which goes between them</EMPHASIS>; tags
  1119. alone are simply the markers at the start and end of elements.</PARA>
  1120. <PARA>Sloppy terminology in specifications causes misunderstandings, so
  1121. formal standards have to be phrased in formal terminology. This is not a
  1122. formal document, and the astute reader may already have noticed it
  1123. refers to <WORDASWORD>element names</WORDASWORD> where <WORDASWORD>element
  1124. type names</WORDASWORD> is more correct; but the former is more widely
  1125. understood.</PARA>
  1126. <PARA>Those new to <LINK LINKEND="faq-sgml">SGML</LINK> may want to
  1127. read something like the <CITETITLE><ULINK
  1128. URL="http://etext.virginia.edu/bin/tei-tocs?div=DIV1&id=SG">Gentle
  1129. Introduction to SGML</ULINK></CITETITLE> chapter of the
  1130. <ULINK URL="http://www-tei.uic.edu/orgs/tei/">TEI</ULINK>.</PARA></SECT2>
  1131. <SECT2 ID="faq-api"><TITLE>Is there a Developer's API kit for
  1132. XML?</TITLE>
  1133. <PARA>Several are reported to be under development. The ones I have
  1134. found so far are:</PARA>
  1135. <ITEMIZEDLIST><LISTITEM> <PARA>The Language Technology Group has
  1136. produced the <PRODUCTNAME>LT XML</PRODUCTNAME> toolkit (<FILENAME><ULINK
  1137. URL="http://www.ltg.ed.ac.uk/software/xml/">http://www.ltg.ed.ac.uk/software/xml/</ULINK></FILENAME>)
  1138. and the DSSSL Syntax Checker (DSC: <FILENAME><ULINK
  1139. URL="http://www.ltg.ed.ac.uk/~ht/dsc-blurb.html">http://www.ltg.ed.ac.uk/~ht/dsc-blurb.html</ULINK></FILENAME>).</PARA></LISTITEM>
  1140. <LISTITEM><PARA>[anyone with details of others please let me know]</PARA></LISTITEM></ITEMIZEDLIST>
  1141. <PARA>The big SGML conversion and application development engines like
  1142. <PRODUCTNAME>Balise</PRODUCTNAME>, <PRODUCTNAME>Omnimark</PRODUCTNAME>,
  1143. and <PRODUCTNAME>SGMLC</PRODUCTNAME> are all working on XML versions.
  1144. Details of SGML software of all kinds are on
  1145. <ULINK URL="http://www.sil.org/sgml/">the SGML Web pages</ULINK>.</PARA></SECT2></SECT1>
  1146. <APPENDIX ID="faq-form"><TITLE>Response and query form</TITLE>
  1147. <TITLEABBREV>Illustration from
  1148. <ULINK URL="http://webreview.com/97/05/16/feature/index.html">Dale
  1149. Dougherty's article in Web Review</ULINK> (courtesy of the
  1150. publishers).<INLINEGRAPHIC
  1151. FILEREF="head-xmlfiles.gif" FORMAT="GIF" XREFLABEL="[XMLfiles image]"></INLINEGRAPHIC>&xmlfiles;</TITLEABBREV>
  1152. <FORM ACTION="http://www.ucc.ie/cgi-bin/uncgi/mailform" METHOD="POST"><INFORMALTABLE>
  1153. <TGROUP COLS="2"><TBODY><ROW><ENTRY VALIGN="TOP"><PARA>Section and
  1154. question:
  1155. <INPUT NAME="QNo" SIZE="6"><DUMMY></INPUT></PARA><VARIABLELIST>
  1156. <VARLISTENTRY><TERM>New material</TERM>
  1157. <LISTITEM><PARA><INPUT
  1158. LANG="checked" TYPE="RADIO" NAME="Type" VALUE="NewQ" CHECKED="CHECKED"><DUMMY></INPUT>
  1159. New question, answer not known</PARA>
  1160. <PARA><INPUT TYPE="RADIO" NAME="Type" VALUE="NewA"><DUMMY></INPUT>
  1161. New question, with sample answer</PARA></LISTITEM></VARLISTENTRY>
  1162. <VARLISTENTRY><TERM>Corrections to existing wording</TERM>
  1163. <LISTITEM><PARA><INPUT TYPE="RADIO" NAME="Type" VALUE="ModQ"><DUMMY></INPUT>
  1164. Correction to an existing question only</PARA>
  1165. <PARA><INPUT TYPE="RADIO" NAME="Type" VALUE="ModA"><DUMMY></INPUT>
  1166. Correction to an existing answer only</PARA>
  1167. <PARA><INPUT TYPE="RADIO" NAME="Type" VALUE="ModB"><DUMMY></INPUT>
  1168. Correction to both question and answer</PARA></LISTITEM></VARLISTENTRY>
  1169. <VARLISTENTRY><TERM>Additional material</TERM>
  1170. <LISTITEM><PARA><INPUT TYPE="RADIO" NAME="Type" VALUE="AddQ"><DUMMY></INPUT>
  1171. Addition to an existing question only</PARA>
  1172. <PARA><INPUT TYPE="RADIO" NAME="Type" VALUE="AddA"><DUMMY></INPUT>
  1173. Addition to an existing answer only</PARA>
  1174. <PARA><INPUT TYPE="RADIO" NAME="Type" VALUE="AddB"><DUMMY></INPUT>
  1175. Addition to both question and answer</PARA></LISTITEM></VARLISTENTRY></VARIABLELIST></ENTRY>
  1176. <ENTRY><VARIABLELIST>
  1177. <VARLISTENTRY><TERM>Question and Answer</TERM>
  1178. <LISTITEM><PARA><TEXTAREA NAME="Q" ROWS="5" COLS="32">[replace this
  1179. with your question]</TEXTAREA></PARA>
  1180. <PARA><TEXTAREA NAME="A" ROWS="5" COLS="32">[replace this with your
  1181. model answer]</TEXTAREA></PARA></LISTITEM></VARLISTENTRY>
  1182. <VARLISTENTRY><TERM>Details</TERM>
  1183. <LISTITEM><PARA>Your name: <INPUT NAME="sender_Name" SIZE="32"><DUMMY></INPUT></PARA>
  1184. <PARA>Affiliation: <INPUT NAME="Affiliation" SIZE="32"><DUMMY></INPUT></PARA>
  1185. <PARA>Email address: <INPUT NAME="sender_Email" SIZE="32"><DUMMY></INPUT></PARA>
  1186. <PARA><INPUT TYPE="SUBMIT" VALUE=" Submit "><DUMMY></INPUT>
  1187. <INPUT TYPE="RESET" VALUE=" Clear and start again "><DUMMY></INPUT><INPUT
  1188. TYPE="HIDDEN" NAME="Version" VALUE="v.1.0"><DUMMY></INPUT></PARA></LISTITEM></VARLISTENTRY></VARIABLELIST></ENTRY></ROW></TBODY></TGROUP></INFORMALTABLE></FORM></APPENDIX></ARTICLE>
  1189.