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

Re: Non-well-formed HTML in XSL

Subject: Re: Non-well-formed HTML in XSL
From: Jeni Tennison <jeni@xxxxxxxxxxxxxxxx>
Date: Fri, 19 Jul 2002 13:23:17 +0100
xhtml2fo img
Hi Richard,

> So the serialiser of the XSL processor does all the clever work of
> <td/> to <td></td> and <td nowrap> then.

Yes.

> That makes more sense to me so you have to be *very* careful when
> using DOE that you are either going to serialise the result straight
> away or what results is *always* going to be valid XML.

Absolutely. If you're not serialising the result straight away then
you can't usually use DOE anyway, since DOE only affects the
serialisation of particular text nodes by the XSLT processor, not
their eventual serialisation (although some processors use processing
instructions to mark DOE text, so I guess the information could get
passed down the pipeline that way).

> That is exactly the situation that I had albeit with MSXML3SP2.
> Looking into the AddParameter call does mention that it is possible
> to send a node list in as a parameter, would I need to parse all
> parameters before sending them in?

Only those ones that you want to set to node-sets, obviously, but yes.

> and what if I wanted to have two <img/><img/> tags one following the
> other. Would I have to encase them in some tag of my own devising
> that the HTML browser would ignore such as
> <holder><img/><img/></holder> parse that and call AddParameter with
> the assembled nodelist variant.

You can select the nodes to pass into the addParameter() call using
selectNodes(). Do something like:

  tempDOM.loadXML("<wrapper>" + yourXHTML + "</wrapper>");

  tempDOM.setProperty("SelectionLanguage", "XPath");
  yourXHTMLAsXML = tempDOM.selectNodes("/wrapper/node()");
  
  processor.addParameter("itemsephtml", yourXHTMLAsXML);

Cheers,

Jeni

---
Jeni Tennison
http://www.jenitennison.com/


 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.