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

RE: binding xml to stylesheet

Subject: RE: binding xml to stylesheet
From: Donal Regan <donal_regan10@xxxxxxxxxxx>
Date: Fri, 12 Mar 2004 07:17:24 +0000 (GMT)
donal regan
Hello,

I think I was a bit vague the first time and I
apologise if this is painfully obvious. 

If I have 

<?xml version="1.0" encoding="utf-8"?>
<?xml-stylesheet href="stylesheet.xsl"
type="text/xsl"?>

<Company>
	<Name>Hello Tours</Name>
	<Location>Dublin</Location>
</Company>
<Company>
	<Name>Bonjour Voyages</Name>
	<Location>Paris</Location>
</Company>

and 



<?xml version = "1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform" >
<xsl:output method="html" indent="no"
omit-xml-declaration="yes"/>

<xsl:template match="/">
<table>
<xsl:apply-templates/>
</table>

</xsl:template>


<xsl:template match="Company">
	<tr><td><b>Name:</b><i><xsl:value-of
select="Name"/></i></td></tr>
	<tr><td><button onClick="getLocation()" >Click
Me!</button></td></tr>
		
</xsl:template>

</xsl:stylesheet>


can I write a getLocation() function that will reside
in the resultant document and that will do something
like
document.parentDocument.getElementsByTagName("Location")
if not, why not? Where has the original document gone?

Cheers,
Donal


If a document has been created by binding an XML doc
to a stylesheet, is it possible to refer to elements
in the original XML document? I'm looking for
something like -
document.parentDocument.getElementsByTagName("Location")
for example.
If not, why not? 


	
	
		
___________________________________________________________
Yahoo! Messenger - Communicate instantly..."Ping" 
your friends today! Download Messenger Now 
http://uk.messenger.yahoo.com/download/index.html

 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


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.