Greg, I don't see why this stylesheet isn't working, it looks like it should. Some things you can try: - are you sure your Context doc is an OWSContext, and not a ViewContext? - use the <debug/> property on your widget to see output - try processing a context doc with that stylesheet outside of the MapBuilder framework using something like XMLSpy
Mike Grégory Babusiaux wrote: > i set the namespaces correctly, i think. > > It seems to me this should work too :S > > here is an config.xml extract: > > <OwsContext id="mainMap"> > <defaultModelUrl>Belgium/belgiumContext.xml</defaultModelUrl> > <widgets> > <MapPaneOL id="mainMapWidget"> > <htmlTagId>mainMapPane</htmlTagId> > <mapContainerId>mainMapContainer</mapContainerId> > </MapPaneOL> > <Legend id="contextLegend"> > <htmlTagId>legend</htmlTagId> > <stylesheet>./Legend2.xsl</stylesheet> > </Legend> > <Widget id="colorHandler"> MY WIDGET > <htmlTagId>color</htmlTagId> > <stylesheet>./colorHandler.xsl</stylesheet> > </Widget> > </widgets> > > here is the really basic test stylesheet: > > > <?xml version="1.0" encoding="UTF-8"?> > <xsl:stylesheet > xmlns:wmc="http://www.opengis.net/context" > xmlns:xsl="http://www.w3.org/1999/XSL/Transform" > xmlns:gml='http://www.opengis.net/gml' > xmlns:wfs='http://www.opengis.net/wfs' > xmlns:sld='http://www.opengis.net/sld' > xmlns:xlink='http://www.w3.org/1999/xlink' > version="1.0"> > > <output method="xml" encoding="utf-8"/> > > <xsl:param name="lang">en</xsl:param> > <xsl:param name="modelId"/> > <xsl:param name="widgetId"/> > > > > <xsl:param name="featureName"/> > <xsl:param name="hidden"/> > <xsl:param name="context">config.objects.<xsl:value-of > select="$modelId"/></xsl:param> > > > > <xsl:template match="/wmc:OWSContext"> > <div><h1>Hello World</h1></div> > </xsl:template> > > </xsl:stylesheet> > > When I load the program, it freezes without loading any widget :S > > Thanks for your help, > > greg > > > > > Le 19-juil.-07 à 14:59, Mike Adair a écrit : > > >> That should work, there are many examples of doing that, if I >> understand your question correctly. Did you make sure to declare >> the namespaces in your XSL file? >> >> Mike >> >> Grégory Babusiaux wrote: >> >>> Hi, >>> >>> I have a simple, rookie question to ask >>> >>> In my model, I created two widgets with, of course, two different >>> stylesheets. >>> >>> Is it possible to match the same elements of the defaultModelUrl >>> XML file within the two stylesheets?? >>> >>> really simple example, I would have >>> >>> <xsl:template match="/wmc:OWSContext"> in Legend.xsl and in >>> myFile.xsl, both from the same model ?? >>> >>> I tried but didn't get any luck :S >>> >>> thanks >>> >>> greg >>> >>> --------------------------------------------------------------------- >>> ---- >>> This SF.net email is sponsored by DB2 Express >>> Download DB2 Express C - the FREE version of DB2 express and take >>> control of your XML. No limits. Just data. Click to get it now. >>> http://sourceforge.net/powerbar/db2/ >>> _______________________________________________ >>> mapbuilder-devel mailing list >>> [email protected] >>> https://lists.sourceforge.net/lists/listinfo/mapbuilder-devel >>> >>> >>> >>> > > > ------------------------------------------------------------------------- > This SF.net email is sponsored by DB2 Express > Download DB2 Express C - the FREE version of DB2 express and take > control of your XML. No limits. Just data. Click to get it now. > http://sourceforge.net/powerbar/db2/ > _______________________________________________ > mapbuilder-devel mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/mapbuilder-devel > > > ------------------------------------------------------------------------- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2005. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ _______________________________________________ mapbuilder-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/mapbuilder-devel
