[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

RE: extracting data from html part result...

Subject: RE: extracting data from html part result...
From: "Aron Bock" <aronbock@xxxxxxxxxxx>
Date: Thu, 12 May 2005 15:24:54 +0000
aron data
Aaron, sorry, I did see that, but assumed it was your output rather than your input. I should have paid closer attention.

First, try this. This input:


<html xmlns:xhtml="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title>Announcements</title>
<link type="text/css" rel="stylesheet"
href="http://my.uwe.ac.uk/uPortal/media/org/jasig/portal/layout/AL_TabColumn/integratedModes/myuwe/skin/myuwe.css"/>
</head>
<body>
<div id="announcements">
<h1>myUWE System Announcements</h1>


<p>Module Marks are now available for the following modules:</p>

<table>
<tr><td>UZYRKF-40-3</td><td>Advanced Radiotherapy Studies</td></tr>
<tr><td>UZYRKC-30-3</td><td>Evaluating Physiotherapy &amp; Practice</td></tr>
<tr><td>UZYRJN-40-2</td><td>Developing Clinical Reasoning &amp; Practice</td></tr>
<tr><td>UZYRJR-20-2</td><td>Fieldwork 2</td></tr>
<tr><td>UZYRJ9-40-2</td><td>Psychosocial Challenges to Occupation</td></tr>
</table>
</div>
</body>
</html>


With this XSL (yours, modified slightly)

<?xml version="1.0" encoding="utf-8"?>
<xsl:stylesheet version="1.0"
   xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
   xmlns:a="atg.uwe.ac.uk"
   exclude-result-prefixes="a">

<xsl:output indent="yes" method="xml" omit-xml-declaration="yes"/>

   <xsl:template match="/">
	    <xsl:copy-of select="html/body/div[@id = 'announcements']"/>
   </xsl:template>
</xsl:stylesheet>

Will copy the div and its contents.

Notice that I've added a "xhtml" prefix to the namespace declaration in your input.

So the reason you were not getting any output previously is because the input was in one namespace, and the processor was looking in another.

Unfortunately I'm not versed in the subtleties of processing wrt namespaces (I've been at this just a few months myself, and I haven't read up enough...), so hopefully somebody more versed than I can comment.

Regards,

--A


From: Aaron Johnson <Aaron2.Johnson@xxxxxxxxx>
Reply-To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
Subject: RE:  extracting data from html part result...
Date: Thu, 12 May 2005 15:27:05 +0100

Aron...

Both xsl and html samples are in the email.

_________________________________________________________________
Express yourself instantly with MSN Messenger! Download today - it's FREE! http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/


Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.