RE: [xsl] object-oriented XSL

Subject: RE: [xsl] object-oriented XSL
From: "Robert Koberg" <rob@xxxxxxxxxx>
Date: Fri, 23 Aug 2002 11:16:09 -0700
Hi,

> -----Original Message-----
> From: owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx
> [mailto:owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx]On Behalf Of
> martin@xxxxxxxx
>
> > On Wed, 21 Aug 2002, Hunsberger, Peter wrote:
>
> > Thinking in terms of using trees to prune and enhance other trees isn't
> > procedural logic and thus may not seem natural if procedural programming is
> > your background.  However, it is an efficient and complete programming
> > methodology; the addition of procedural logic is not necessary.  If you want
> > procedural logic, use a procedural language (Java comes to mind!), don't
> > invent a new one.  If you want to combine XML and procedural methodologies
> > in a single "language" you may want to look at XSP (implemented again in
> > Cocoon, but I believe also other places?) which combines XML and Java.
>
> if you want declarative logic, use a declarative language, don't invent a
> new one! seriously though, coming from a background of both functional and
> procedural programming i think i am capable to see the strengths as well
> as the weaknesses of XSLT. and it's exactly its strengths that i am
> wishing to leverage here, and i think that to a great extent that can be
> done within a purely procedural, oo model.

I have a concern about mixing concerns :)

Would you consider building relative paths for all links (nav, snailtrail,
pagers, content links, etc) in your output to be business logic. It does not
seem to be styling.

If you maintain a site structure in an XML file you can build these relative
paths with XSLT. You do not need to hardcode specific links. You can reference
an internal link through an ID and travel up and down the XML site hierarchy to
determine the relative path to a file. I find this much easier to do at
transformation time in the XSL than anywhere else. I do not want to hardcode the
links relative path because they could change. But this is not styling, right?
So how would you do it? Note: I do not want to use root relative paths.

I am seeing people with this mindset totally neglecting very powerful parts of
XSL.

fwiw,
-Rob



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


Current Thread