|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Hmtl -->xml -->xsl?
Hello Dev Shed
I am new to XML, but I like it a lot. I am trying to launch a XML document from my HTML page that has been tranform with XSL (I guess I said that right). I want to use the HTML version because it already has the template I want to use. This is what I am trying to do. Launch my HTML page, it in turn launch my XML document which in turn look to the XSL document for it's format. That format is then included in a table of my HTML. Is there a way of doing this? ![]() |
|
#2
|
|||
|
|||
|
Not sure what you want to do is achievable. It is fairly easy embed your existing HTML template in a stylesheet.
Perhaps the following example will help you: test.xsl: <?xml version="1.0" encoding="ISO-8859-1" ?> <?xml-stylesheet type="text/xsl" href="test.xsl" ?> <example> <heading>heading 1</heading> <heading>heading 2</heading> <heading>heading 3</heading> </example> test.xsl: <?xml version="1.0" encoding="ISO-8859-1" ?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <xsl:template match="/"> <html> <head> <title>Example</title> </head> <body> <xsl:for-each select="example/heading"> <br /> <h1><xsl:value-of select="."/></h1> </xsl:for-each> </body> </html> </xsl:template> </xsl:stylesheet> Point IE6 or similar browser at test.xml and see the results. - F |
![]() |
| Viewing: Dev Shed Forums > Programming Languages - More > XML Programming > Hmtl -->xml -->xsl? |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|