MathGroup Archive 2005

[Date Index] [Thread Index] [Author Index]

Search the Archive

Stylesheets vs. DTDs or XML Schemas

  • To: mathgroup at smc.vnet.net
  • Subject: [mg61387] Stylesheets vs. DTDs or XML Schemas
  • From: "Steven T. Hatton" <hattons at globalsymmetry.com>
  • Date: Mon, 17 Oct 2005 02:29:56 -0400 (EDT)
  • Sender: owner-wri-mathgroup at wolfram.com

This question is really for people who understand what a DTD and XML Schema
are.  For people who don't know what these are, very briefly, DTD and XML
Schema are meta-languages used to create meta-documents which specify the
logical structure of documents.  The DTD specification language is much
older than XML Schema, and dates back to a time before there was a WWW.  It
was used to specify markup languages used by publishers to organize the
structure of their publications.  HTML is a bad example of such a markup
language because it mixes formatting information with structural
information.  It also has some other shortcomings, but some of these were
inherited from SGML (Standard Generalized Markup Language).  XML was
created, in part, to recover the integrity of SGML, and also to streamline
SGML so the resulting language would be easy to parse.  

DocBook is a good example of how these document specifications work.  It
specifies such things as what can be directly nested within a chapter, and
what must be "wrapped" in outer tags.  For example, you can't put a
<listitem> directly in a <chapter> entity.  The <listitem> needs to be
inside an entity that permits it, such as <itemizedlist>.

I know the structure of a Mathematica notebook is very similar to XML, and I
am confident that it Mathematica could be made to support DTDs or other
documentation specification formats, but I don't believe it currently does
support these in the sense of enforcing the validity of a DTD for a
notebook.  IOW, I believe any style defined within a stylesheet can be used
anywhere in the notebook.  Is this correct?

What I want, for example, is the ability to create a "Theorem" cell that
would have a subordinate cell which might be called "formalStatement", and
another cell called "proof".  Likewise for lemas, etc.  These would not, of
themselves, impose any kind of formatting on the content.  Such formatting
would be accomplished using style specifications.  The rudementry
components seem to be present in the current Mathematica stylesheet
support, though these seem to be implemented by convention, rather than
formality.

Are there ways to design such composite cell structures so that I could
simply create a "theorem" cell, and it would create whatever required child
cells were defined for "theorem", and also provide me with a convenient
means of determining what kinds of cells can be used in the immediate
context?
-- 
"Philosophy is written in this grand book, The Universe. ... But the book
cannot be understood unless one first learns to comprehend the language...
in which it is written. It is written in the language of mathematics, ...;
without which wanders about in a dark labyrinth."   The Lion of Gaul


  • Prev by Date: Re: formatting table with integers and floats in a column
  • Next by Date: Re: surface fitting question
  • Previous by thread: Re: How smooth graphs?
  • Next by thread: Re: Stylesheets vs. DTDs or XML Schemas