XML + XSL embedded into HTML

Please support our XML, XSLT and XPATH advertiser: Intel Parallel Studio Home
Reply

Join Date: Oct 2008
Posts: 1
Reputation: Anthraxnz is an unknown quantity at this point 
Solved Threads: 0
Anthraxnz Anthraxnz is offline Offline
Newbie Poster

XML + XSL embedded into HTML

 
0
  #1
Oct 8th, 2008
sorry if this is a dumb FAQ type question, but i have been searching all morning for a answer.

Heres the setup.
I have an Oracle 10g DB outputting Relational Tables into XML.
heres an example out some output.
XML, XSLT and XPATH Syntax (Toggle Plain Text)
  1. <?xml version = '1.0' encoding="ISO-8859-1"?>
  2. <?xml-stylesheet href="blog.xsl" type="text/xsl"?>
  3. <ROWSET>
  4. <ROW num="1">
  5. <B_PAGE>6206</B_PAGE>
  6. <B_TYPE>course</B_TYPE>
  7. <B_TITLE>Aims:</B_TITLE>
  8. <B_AUTHOR>Steve Mckinlay</B_AUTHOR>
  9. <B_DATE>10/1/2008 0:0:0</B_DATE>
  10. <B_BODY>To give students an understanding of database design.</body>
  11. </ROW>
  12. </ROWSET>

im using a XSL stylesheet to style the data stored in the XML file.
XML, XSLT and XPATH Syntax (Toggle Plain Text)
  1. <?xml version="1.0" encoding="ISO-8859-1"?>
  2. <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
  3. <xsl:template match="/">
  4. <html>
  5. <body>
  6. <xsl:for-each select="ROWSET">
  7. <xsl:for-each select="ROW">
  8. <p>
  9. <td><xsl:value-of select="B_BODY"/></td>
  10. <td><xsl:value-of select="B_AUTHOR"/></td>
  11. </p>
  12. </xsl:for-each>
  13. </xsl:for-each>
  14. </body>
  15. </html>
  16. </xsl:template>
  17. </xsl:stylesheet>

Now thats the underlying functionality done, i also have a plain old HTML homepage; i need to get the styled XML\XSL content onto it in amongst the other HTML stuff on that page ( its not much just a couple of <p> and <IMG>)

the problem is that the .xml file is somewhat dynamic and it will be overwritten alot so that leaves out putting the html content in there.

what i would basically like is to open the .xml file with its styling and display the styled content on my HTML page.

Can anyone help me please i really stuck on this one, i looked at JAVA and some <XML> thing but couldn't understand how they worked.
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:



Similar Threads
Other Threads in the XML, XSLT and XPATH Forum
Thread Tools Search this Thread



Tag cloud for XML, XSLT and XPATH
About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC