[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] apply-templates instead of for-each
<xsl:variable name='gtmenu'
select="document('..\pages\gtmenu.xml')/XPage/MenuBar/Menu/MenuItem" />
<xsl:for-each select="$gtmenu"> <Event method="menuAction" target="{@name}" type="MenuHandler" /> </xsl:for-each> where gtmenu.xml is <?xml version="1.0" encoding="ISO-8859-1"?> <XPage op-menus="AmbitoLista,DocumentoSerieLista,DocumentoTipoListaRef,EntidadeListaDoc,SessaoLista,TarefaTipoListaRef"> <MenuBar> <Menu name="mnuFile" content="File"> <MenuItem name="mnuOp1" content="AmbitoLista" /> <MenuItem name="mnuOp2" content="DocumentoSerieLista" /> <MenuItem name="mnuOp3" content="DocumentoTipoListaRef" /> <MenuItem name="mnuOp4" content="EntidadeListaDoc" /> <MenuItem name="mnuOp5" content="SessaoLista Serie" /> <MenuItem name="mnuOp6" content="TarefaTipoListaRef" /> <MenuItem name="mnuExit" content="Exit" op-menu="0"/> </Menu> </MenuBar> </XPage> to produce <Event type="MenuHandler" target="mnuOp1" method="menuAction"/> <Event type="MenuHandler" target="mnuOp2" method="menuAction"/> <Event type="MenuHandler" target="mnuOp3" method="menuAction"/> <Event type="MenuHandler" target="mnuOp4" method="menuAction"/> <Event type="MenuHandler" target="mnuOp5" method="menuAction"/> <Event type="MenuHandler" target="mnuOp6" method="menuAction"/> <Event type="MenuHandler" target="mnuExit" method="menuAction"/> that is working ok. But then i try to replace the for-each to <xsl:apply-templates select="$gtmenu" mode="event"/> <xsl:template match="$gtmenu" mode="event"> <Event method="menuAction" target="{@name}" type="MenuHandler" /> </xsl:template> but thos wonm't work. What am i thinking wrong? Thanks.
|
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
|