xsl-list
[Top] [All Lists]

Re: xsl:apply-templates in javascript

2005-05-26 11:01:49
Brandon,

At 10:07 PM 5/25/2005, you wrote:
That sounds interesting, but I'm not sure what you mean by a "whole branch" in XSLT.

Yes ... but I was just thinking aloud ... that in principle, there's nothing preventing you from applying templates in the normal way and letting your regular serializer write it out ... though this would be (as I also remarked) a bad idea if only because getting it to work in one tool would be no guarantee it would work in another (due to the range of possible behaviors in the serializer).

I've tried the disable-output-escaping, and that only works if your template escapes the tags in the first place, ie <. I understand this is a horrible misuse of XSL and it's a shame to do it, but I'd like not to load all these images when the page loads, and only load them on demand. The document.write() mechanizm is the only way I know how to do it so far.

Look into Javascript support for the DOM ... that's the direction I would recommend. Ideally you should be able to add nodes to the document tree that perform your fetching, rather than writing it in as HTML to be parsed. This would be much easier to handle from the XSLT layer. The tag-writing approach crosses the line from building an output document to, in effect, literate programming (or logic-driven code-writing, if you like) -- while still using the HTML serializer. Ick.

Good luck,
Wendell


======================================================================
Wendell Piez                            
mailto:wapiez(_at_)mulberrytech(_dot_)com
Mulberry Technologies, Inc.                http://www.mulberrytech.com
17 West Jefferson Street                    Direct Phone: 301/315-9635
Suite 207                                          Phone: 301/315-9631
Rockville, MD  20850                                 Fax: 301/315-8285
----------------------------------------------------------------------
  Mulberry Technologies: A Consultancy Specializing in SGML and XML
======================================================================


--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--



<Prev in Thread] Current Thread [Next in Thread>