I have a render XSLT that loads a XML that displays HTML based on the XML. That is working fine but rendering by getxmldocumentbyurl gives the pure XML while I like to have the HTML. What function should I use with XSL stylesheets in the XML?
It makes sense that the XML is returned. It's then up to you to transform it into HTML output.
wrap a <textarea></textarea> around your <xsl:copy-of select="$xml" /> and copy/paste the rendered xml content into an editor where you can see the whole structure.
Then you can easily see, which xpath you need to use to fetch the values you wan to show in your output html.
I removed the stylesheet from the XML and merged it in the render XML so I have got now one XSLT instead of two. The XSLT looks like below. At the moment I get a stackoverflow error in a javascript alertbox. It is at line 23 and that is the onload function in the body tag. The onload function is created by the XSLT. When I look in the source of the page I see the javascript rendered by the XSLT except the iteration through the GPX variable. Any suggestions?
HTML from XML by XSL, render by XSLT
Hi,
I have a render XSLT that loads a XML that displays HTML based on the XML. That is working fine but rendering by getxmldocumentbyurl gives the pure XML while I like to have the HTML. What function should I use with XSL stylesheets in the XML?
Thanks, Roel
Render XSLT:
Hi Roel
It makes sense that the XML is returned. It's then up to you to transform it into HTML output.
wrap a <textarea></textarea> around your <xsl:copy-of select="$xml" /> and copy/paste the rendered xml content into an editor where you can see the whole structure.
Then you can easily see, which xpath you need to use to fetch the values you wan to show in your output html.
I hope this makes sense?
/Jan
Hi,
Wouldnt't it be possible to use it like this in the XML:
<?xml-stylesheet type="text/xsl" href="http://www.gpsblog.nl/scripts/GPX2GoogleMaps.xml" ?>
So the stylesheet can transform the XML to HTML instead of using XPath. Is there a function in Umbraco to get the HTML generated by the XSL from XML.
Roel
I removed the stylesheet from the XML and merged it in the render XML so I have got now one XSLT instead of two. The XSLT looks like below. At the moment I get a stackoverflow error in a javascript alertbox. It is at line 23 and that is the onload function in the body tag. The onload function is created by the XSLT. When I look in the source of the page I see the javascript rendered by the XSLT except the iteration through the GPX variable. Any suggestions?
Solved! Take a look aty below, namespace issue. Google maps does not work yet but you can iterate through the gpx...
is working on a reply...