|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: several questions on XML to HTML processing with XSL
H.vanderLinden@xxxxxxxxxxxxx wrote:
>
> This is similar to what I have except for the <xsl:apply-templates /> part.
> This is more detailed with <xsl:call-template...> statements.
> I want to get rid of this structure since it involves copying the actual
> content of the DIV/LAYER part and
> modifications to that part should be carried out twice.
Michael Kay's answer was actually much better than mine.
Use <xsl:element name="{$PageSection}"> ...
> > turns <img src="img.jpg" /> into <img src="img.jpg">
> > and <br /> into <br>.
>
> Ah well, I didn't know about that (thanks for the info) but at the moment
> it's not relevant to my problem.
Actually - it's completely relevant.
> <maintext>
> <table cellspacing='0' border='0'>
> <tr><td><img src='myimage.jpg'></td><td>some text</td></tr>
> </table>
> <!-- some more HTML formatted text -->
> </maintext>
You should combine <xsl:copy-of /> with the HTML output method.
<xsl:template match="maintext">
<xsl:copy-of select="child::node()" />
</xsl:template>
Use well-formed XML, and it will magically be transformed to
abbreviated HTML - ie. you should use <img /> in your XML.
> 4. How do I declare a variable parametername?
>
> I'd like to do the following, but Saxon returns an errormessage on the
> <xsl:with-param> line (invalid $ character).
>
> <xsl:variable name="ParamName">someXMLtag/@someAttribute</xsl:variable>
>
> <xsl:call-template name="SomeTemplateName">
> <xsl:with-param name="$ParamName">whateverValue</xsl:with-param>
> </xsl:call-template>
I don't quite understand what you're trying to do - do you mean to
say that you don't know the name of a parameter in a named template?
The name attribute on <xsl:with-param> must be a QName, so you
can't set this dynamically in any case.
--
Warren Hedley
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|

Cart








