<?xml version="1.0" standalone="yes" ?>
<?xml-stylesheet type="text/css" href="wheat.css" ?>
<book>
  <title>Random Musings, 09/04/2010</title>
  <author>Bruce B. Salem</author>
    <section>On Recent Weather</section>
      <para> Random thoughts for today. The style for this page matches the
      weather for today, clear, blue sky, and, thank God, or your favorite
      myth, cooler than it has been here within recent days.</para>
      <para>
	I changed the background to <emph>wheat</emph> on 09/05. I'm not
	sure what that says about the weather, maybe it says that the season
	if for harvest, and judging by the plums and necturines for sale
	at the Farmer's Market, today, or at Trader Joe's, it is probably
	good.
	</para>
      <para> What is more, today, <red>September 3, 2010</red>,
       in California, we
      have absolutely nothing to complain about as concerns the weather.
      As compared to what weather this season has brought to most of the
      rest of the US., and is what is happening today on the East Coast
      with <red>Hurricane Earl</red>, we have not a thing to carp about.
	Update: Sept. 4, the hurricane was not the threat it might have
	been, having been downgraded to a tropical storm. Still that has
	a punch that will be directed at Long Island and Cape Cod. And
	by 09/05 that didn't turn out to be the case. The tropical storm
	had veered east and hit Nova Scotia instead, and did little more
	than break some tree branches.
      </para>
      <para>
      Oh, it has been a cooler than normal Spring and Summer,
      here. but that is all we need be concerned about as compared to
      the extreme weather elsewhere in this country, let alone the
      world, where the effects of global warming dominate the new
      records set in temperture as well as rainfall, such as in
      the <red>Monsoon</red> in <red>Pakistan</red>, this year.
      </para>
   <section>This is XML with CSS</section>
      <para>
      This document is going to be rendered HTML from an XML source through
      a CSS stylesheet. As such it is static, suitable for a book where text
      is to be rendered but once. I have styled XML before, but needed to go
      to the depths of using XSLT because I needed to generate a Table of
      Contents on the fly each time a new section header was added.
      </para>
      <para>
      I was able to style the root element with the global style for the page.
      The example i had did not specify the units for the 
         <emph>margin-top</emph> style and so did not produce any
      spacing between the paragraph blocks. So, explicit units did
      work. the rest of the stylesheet parameters appeared to have
      worked as expected. I really do like the serifs on the big paragraph
	 initials.
      </para>
      <para>
	The DOM inspector in the browser is pretty good at explaining errors
	in the XML. There is no DTD for this XML as yet. It will be interesting
	to see if my web host cares about that. They could insist that all
	XML documents have a data defination or schema.
	</para>
      <para>
	I assume that if I wanted to style HTML elements I would have to
	include the appropriate namespace in the declarations, to get
	the tags that carry special fonts. Although, the browser might do
	that for me whether or not that is truely portable. I could try
	it and the worst that would happen is that the DOM inspector
	complains. It just ignored the HTML tags I inserted. I think that
	I should include the XHTML namespace, as I did recently to do
	XML inside an HTML page.
	</para>
      <para>
	I tried to change the text color of this paragraph setting
	either an <emph>id</emph> or a <emph>class</emph> as a
	attribute to the value of <emph>"green"</emph> and it had no
	effect. Setting the color within a unique XML element did
	change the color. And checking the color value, by setting it
	elsewhere did work. Looks like a bug to me. Moving the color
	spec. from the root element to the para element didn't
	work.
	</para>
	<paragreen>
	The only thing left to try is to make the para instance in
	which I want the color change to be a unique XML element, like
	<emph>&lt;pragreen&gt;</emph> and not use the class or id
	mechanism at all since it ovbiously doesn't work. The fault
	could be mine for not including a namespace that is truely
	needed. But until I figure that out, it is a workaround worth
	trying.
        <emph><red>That finally worked as I had wanted!</red></emph>
        And I made it a red-letter day by nesting
	the <emph>&lt;red&gt;</emph> element inside
	the <emph>&lt;emph&gt;</emph> element! I just noticed that the
	first letter cuteness in the <emph>&lt;para&gt;</emph> element
	is not implemented in the <emph>&lt;paragreen&gt;</emph>
	style. I guess that I have to replicate the pseudo-element as
	per that element.
	  <emph><red>And that worked!</red></emph>
	</paragreen>
	<para>
	  Remember that all of this is implemented only in the style sheet
	  for XML, the HTML needed is generated by the interaction, and the
	  blowser doesn't show me the HTML at all. It doesn't need to.
	  </para>
	<para>
	  The canvas tools in <emph>HTML5</emph> and the ability to save the
	  results as images from the demos I have seen gives me the idea to 
	  generate abstract background patterns that can be used on either
	  XML or HTML pages. I should be able to set a background image
	  in the same way as I specify a background color in the style
	  sheet.
	  </para>
</book>
