[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: Advice needed on an XSL v/s DOM imlementation

Subject: Re: Advice needed on an XSL v/s DOM imlementation
From: Dave Halls <daveh@xxxxxxxxxxxxxxx>
Date: Tue, 17 Nov 1998 10:58:25 +0000
domsdk
I use Docuverse's DOMSDK's HTMLFactory to build up HTML elements,
then stringify it to a file. Actually, I added on some minimization for
elements
with minimization tags in the HTML 4.0 DTD, it's very easy to do.

DOMSDK seems to work well. There is a small problem with
DocumentFragments
but I understand that will be fixed in the next release.

Also, I've embedded a matching/pattern facility in Java, so my
transformation
programs specify the patterns, then build HTML in response. The patterns

are basically a combinator parser from which one builds matches on the
DOM tree.

e.g.


 onlyElement("label").and(
  inAncestor(onlyElement("format"))).fires(

  new Handler()
  {
   public Object fire(Bindings b, Matcher m, Node n)
   {
    DocumentFragment frag = doc.createDocumentFragment();

    Util.appendChildren(frag,
       Query.processChildren(textPattern, n));

    return frag;
   }
  })).or( .........
[lots of patterns left out]

Basically, one composes rules using small, clean, functional
combinators.
Then when a rule fires, one creates some HTML and returns it.
The HTML is then amalgamated, forms a tree and bob's your uncle,
you print it to a file or whatever.
The patterns built up can be complex, I have some demos in which an
orgchart is rearranged into a set of linked GIFs for instance,
and a complete electronic forms app too.

I hope to write this up (I already have Javadoc for it all) and release
some
JAR file soon.

We've done the same in Standard ML, which being a functional programming

language makes certain things look nicer - but obviously not as many
people
use that. We hope to make that available too.

This may not have helped but I guess it might be a pointer to things
one can do using using the DOM and a PL.

Dave



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


Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.