This is the mail archive of the xsl-list@mulberrytech.com mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

RE: Non-well-formed HTML in XSL


> -----Original Message-----
> From: David Carlisle [mailto:davidc@nag.co.uk]

> In the case of HTML the XML representation is the fairly obvious one,
> using XML elements and attributes to denote HTML ones.

So the serialiser of the XSL processor does all the clever work
of <td/> to <td></td> and <td nowrap> then. 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.

> which is horrible, and as often stated won't work as often as not in
> XSLT pipelines.
> 
> > which used to be
> > <xsl:param name="itemsephtml"><img src="/wdp/images/spc.gif" alt=""
> > height="1"/></xsl:param>
> 
> much better!

I liked it too but...

> 
> > but I found when I passed a parameter with a text more or 
> less similar
> > to the <img tag the <xsl:copy-of/> that I used to use to show
> > the parameter no longer worked so I was forced to this solution with
> > <xsl:value-of D-O-E/>
> 
> You presumably had a coding error, but unless you show us the 
> example, I
> don't see what other help we can give.
> 
> If by passed a parameter you ment something like on the command line
> 
> saxon file.xml file.xsl  itemsephtml='<img src="/wdp/images/spc.gi"/>'
> 
> then that is not passing an element in as a parameter but a string.
> Most XSLT systems only let you pass in strings from their command line
> interface, and you have to use an API from some other language to pass
> in node sets. In particular starting from <img
> src="/wdp/images/spc.gi"/> you've got to get an XML parser 
> into the loop
> somewhere.
> 
> 
> David

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? 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.

I realise that I'm mostly talking MSXML here but it is I believe a
relevant
issue on how to pass a node list into a parameter.

Richard Mitchell
Software Development Manager
http://www.vbnonline.com/
 

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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]