Re: Microsoft XSL and Conformance

Subject: Re: Microsoft XSL and Conformance
From: Dan Morrison <dman@xxxxxxxx>
Date: Fri, 17 Mar 2000 02:01:12 +1300
Andrew Kimball wrote:
> 
> Hi all,

Thanks for your timely contribution. (Look folks, they DO pay attention)

On a tangent, I admit I didn't fully understand the issue I commented on
earlier was to do with nested templates. Now I've gotta say GREAT.

I still admit to not knowing the issue from ALL sides but...

IMO, nested templates are an extremely useful metaphor, and to take back
my earlier comment
>...will they actually
>get USED unless there was a need for them in the first place?

I'm all for it.

OK, to give a concrete example...
For years now I've been developing site management systems. Applying
templates are the way to go. Content vs Layout vs Logic.

Long before I'd heard of XML I was designing templates as HTML with 
<CONTENT>Content goes here</CONTENT>
tags, and parsing them out using whatever language was appropriate.

The natural step beyond that was 
...
<NAVBAR>
 <NAVBAR_ITEM>
  <a href="<HREF></HREF>">
   <TITLE>Title here</TITLE>
  </a>
 </NAVBAR_ITEM>
</NAVBAR>
... nested template!

My syntax is of course non-compliant with anything, but this was before
standards, remember.

BUT my parser would scan a single html template and know how to format
everything, and most importantly, that html file could be VIEWED,
edited, and changed late in the project and have the appropriate
effects.

This month I've had to do the same thing for a large Teleco intranet.
It's a corporate intranet, ergo they use Frontpage (Spawn of the Devil
TM).
They will continue to manage the site in FP. I could not get sign-off to
upgrade the server to MSXML. So I used this syntax with yet another
custom parser.

They now have a WISYWIG, Frontpage-safe(!) template document that can be
modified using any brain-dead tool and still trickle down to create the
navbar on every single page.

_Without_ nesting you have (assuming you don't talk tricky XSL)

<NAVBAR>
 <NAVBAR_ITEM_HERE>navbar would go here</NAVBAR_ITEM_HERE>
</NAVBAR>

<NAVBAR_ITEM>
 <a href="<HREF></HREF>">
  <TITLE>Title here</TITLE>
 </a>
</NAVBAR_ITEM>

... You can draw the XSL comparison pretty simply.

But the point is that my examples actually were MUCH more complex with
table layout, backgrounds, alignment, dhtml pop-ups and all.

Out of context (say an item is a TR row) the non-nested template makes
no visual sense.
No existing tool will help you tune the layout.

I really appreciate nesting xsl:template items, aesthetically (IMO it's
a Good Thing([TM]), technically (automatic scoping), and
maintainence-wise (the template is actually in the part of the document
you're looking for it in).

I'm sorry to hear from this anti discussion that it apparently isn't in
the spec. 
I learned in the usual manner (view source & copy) and thought that
non-support from other platforms was just non-compliance.

If this makes me Devils advocate, so be it, but as I've said in my giant
letter, I have already found VERY practical uses for this methodology.

.dan.

-- 
:====================:====================:
: Dan Morrison       : The Web Limited    :
:====================:====================:
: http://here.is/dan : http://web.co.nz   :
: dman@xxxxxxxx      : danm@xxxxxxxxx     :
:  04 384 1472       : 04 495 8250        :
: 021 115 7339       :                    :
:.........................................:
: Every morning is the dawn of a new error:
:.........................................:


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


Current Thread