Wrox Programmer Forums
Go Back   Wrox Programmer Forums > XML > XSLT
|
XSLT General questions and answers about XSLT. For issues strictly specific to the book XSLT 1.1 Programmers Reference, please post to that forum instead.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the XSLT section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old September 26th, 2013, 09:37 AM
Registered User
 
Join Date: May 2013
Posts: 2
Thanks: 1
Thanked 0 Times in 0 Posts
Default Generating Jsf pages with xsl stylesheet

Hi people!, im trying to generate jsf pages from an xml using an xslt stylesheet, i have a problem now, that i cant generate an output like this:

<h:panelGroup rendered="#{beanXML.especialidad.nombre=='Cardiope diatria'}">

the output that im getting is:


<h:panelGroup rendered="#beanXML.especialidad.nombre=='Cardioped iatria'">

the {} are missing,

im using this xsl style sheet:

<xsl:template match="especialidad">
<h:form>
<h:panelGroup rendered="#{../@valor}=='{@nombre}'">
..

The xml file is:

<setcon valor="beanXML.especialidad.nombre">

<especialidad nombre="Cardiopediatria" tipoconsulta="#{beanXML.tipoConsulta}">



i must compare the property of a bean (beanXML.especialidad.nombre) in java with a value of a property ( nombre) in the xml, ive tryeid using xsl:text
and puting the values of {='{' and }='}' like i did with #= '#' but its nots working net beans say unable to parse
im using com.sun.org.apache.xalan.internal.xsltc.trax.Trans formerImpl - default JRE XSLT processor.

this is the header of my xsl style sheet:

xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
xmlns="http://www.w3.org/1999/xhtml"
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:h="http://java.sun.com/jsf/html">
<xsl:output method="html"/>


hope u can help! please!
 
Old September 26th, 2013, 09:49 AM
mhkay's Avatar
Wrox Author
 
Join Date: Apr 2004
Posts: 4,962
Thanks: 0
Thanked 292 Times in 287 Posts
Default

You can use doubled curly braces in an AVT to output a literal curly brace. So it would be

Code:
<h:panelGroup rendered="#{{{../@valor}=='{@nombre}'}}">
__________________
Michael Kay
http://www.saxonica.com/
Author, XSLT 2.0 and XPath 2.0 Programmer\'s Reference
The Following User Says Thank You to mhkay For This Useful Post:
juanjoalbo (September 26th, 2013)
 
Old September 26th, 2013, 10:11 AM
Registered User
 
Join Date: May 2013
Posts: 2
Thanks: 1
Thanked 0 Times in 0 Posts
Default

Thanks a lot! :), worked fine, now i can cont with my job! ty again!
 
Old January 11th, 2014, 08:11 AM
Registered User
 
Join Date: Jan 2014
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hello! I'm also using XSLT to render a XHTML page in JSF. Do you use a Java Transformer to make the XSLT or how does your setup looks like?





Similar Threads
Thread Thread Starter Forum Replies Last Post
Generating HTML Report from xml input file using stylesheet debu37 XSLT 0 September 17th, 2013 02:38 PM
Building Web 2.0 UIs with JSF, Realtime Updates with JSF & Ajax Push Taught at GIDS Shaguf J2EE 0 March 4th, 2010 07:54 AM
Building Web 2.0 UIs with JSF, Realtime Updates with JSF & Ajax Push Taught at GIDS Shaguf J2EE 0 March 4th, 2010 07:53 AM
scx to html, using a xsl stylesheet bluetorch XSLT 0 October 18th, 2005 11:38 AM
XSL Stylesheet Problem Ben Horne XSLT 4 March 6th, 2004 05:50 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.