homepage Welcome to WebmasterWorld Guest from
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member
Home / Forums Index / Code, Content, and Presentation / XML Development
Forum Library, Charter, Moderators: httpwebwitch

XML Development Forum

how to put c:if statements in generated HTML
xsl html c:if

Msg#: 4507148 posted 1:49 am on Oct 12, 2012 (gmt 0)

I am trying to put c:if lines out in the HTML my XSL is creating from the XML

If I use this:

<xsl:text disable-output-escaping="yes"><c:if test="${value=='yes'}"></xsl:text>

when the XSL runs it says the prefix "c" for element "c:if" is not bound ..

If i use like &lt; and &gt; for the < > before/after the c:if.. then the error goes away but my html does not render as needed.

Is there some way to put out this line of text and not have the XSL translation care about the "c:if" ?



WebmasterWorld Senior Member 5+ Year Member

Msg#: 4507148 posted 11:47 pm on Nov 4, 2012 (gmt 0)

The prefix needs to be identified in the root of your XSLT.
See [w3schools.com...] where it has this in the root
and the following as the if expression.
<xsl:if test="price &gt; 10">

Notice how the xsl: is defined as pointing to XSL Transform namespace.

Global Options:
 top home search open messages active posts  

Home / Forums Index / Code, Content, and Presentation / XML Development
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved