[XSL-LIST Mailing List Archive Home] [By Thread] [By Date]

RE: Style vs. transformation


Subject: RE: Style vs. transformation
From: "Smith, Brooke" <Brooke.Smith@xxxxxxxxxxxxxxxxxxx>
Date: Thu, 5 Mar 1998 10:18:19 +1000

	-----Original Message-----
	From:	David Megginson [SMTP:ak117@xxxxxxxxxxxxxxxxxxx]
	Sent:	Thursday, March 05, 1998 2:03 AM
	To:	xsl-list@xxxxxxxxxxxxxxxx
	Subject:	RE: Style vs. transformation

	David Megginson said:
>>
	It's certainly an interesting idea.  Here's one possible syntax
for a
	rule that would transform <para>...</para> to <P x="y">...</P>:

	  <rule>
	    <target-element type="para"/>
	    <xml-element type="P">
	      <xml-attribute-list>
		<xml-attribute name="x" value="y"/>
	      </xml-attribute-list>
	      <children/>
	    </xml-element>
	  </rule>

<<

But I thought that what aren't action commands such as '<children/>' WAS
OUTPUT and thus an easy means to do a translation.

Perhaps I'm a little confused about XSL after reading the Microsoft
tutorial (http://www.microsoft.com/xml/xsl/).

I thought that the actions were an output.  Here's what Lesson #5 says
essentially:

The XSL:

<rule>
  <target-element/>
  <DIV>
    <children/>
  </DIV>
</rule>

would turn:

<document>
  <chapter>
    <title>XSL Overview</title>
    <topic>Overview of XSL and its extensibility</topic>
  </chapter>
</document>

into:

<DIV>
  <DIV>XSL Overview</DIV>
  <DIV>Overview of XSL and its extensibility</DIV>
</DIV>

And thus the action consisted of action commands such as '<children/>',
and things that were sent to the output stream such as '<DIV>' and
'</DIV>' in this case.  Maybe what Microsoft was talking about was
directly connected to their XSL parser which they said only delivered
HTML (currently).

Maybe the <DIV> is also an action command (?).  

My problem could be that I use Omnimark for SGML translations and so am
used to the idea of outputing such-and-such upon element X:

element document
    output "<DIV>%c</DIV>"

or in the case of the above rule:

element #implied
    output "<DIV>%c</DIV>"

The question posed from looking at Omnimark is why use XML as the XSL
script, where I see a problem with understanding what are actions and
what is the output (Question - is <DIV> different to <children/>?)?  I
had a go at learning DSSSL but haven't given it enough of a go as it
seems oh so complicated.  XSL seems much simpler though obviously (for
me) it causes confusion.  

Could someone clear up this confusion, I'd be most grateful.

Thankyou,

Brooke
==============================================
http://www.butterworths.com.au/profile/people/brooke/bw.htm
+61 412 024 742                                       +61 2 9422 2223
            Butterworths Electronic Publishing Developer



 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list



Current Thread
Keywords