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

Cant get Value

Subject: Cant get Value
From: P Vikram <vikram_good_boy@xxxxxxxxx>
Date: Wed, 5 Sep 2001 13:09:03 -0700 (PDT)
documentelement.transformnode
Hi
Iam unable to populate my textbox with value.My code
is as follows:

Iam able to get the value with
alert(testXML.documentElement.selectSingleNode("//TEST").text);

<?xml version="1.0" ?>
<xsl:stylesheet
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
version="1.0"
               
xmlns="http://www.w3.org/TR/REC-html40">
				
<xsl:template match="/">
	<xsl:apply-templates select="//TESTDATA"/>
</xsl:template>

<xsl:template match="TESTDATA">
	<xsl:apply-templates select="//DETAILS"/>
</xsl:template>

<xsl:template match="DETAILS">
	<xsl:apply-templates select="//TABLE"/>
</xsl:template>

<xsl:template match="TABLE">

		<INPUT maxLength="7" name="test" size="14">
    <xsl:attribute name="value">
      <xsl:value-of select="TEST"/>
    </xsl:attribute>
  </INPUT>
</xsl:template>

</xsl:stylesheet>


function test() {
	
	var xslFile;
	testXSL.async = false;
	xslFile = "test.xsl";
	testXSL.load(xslFile);
	
	rcXSL = titleXSL.parseError.errorCode;
	//alert(rcXSL);
	tdata = titleXSL.parseError.reason;
	//alert(tdata);
	rcXML = titleXML.parseError.errorCode;
	if (rcXSL+rcXML == 0) 
		{
		optHTML =
testXML.documentElement.transformNode(testXSL.documentElement);
		}
	
	document.all.item("test").innerHTML=optHTML;
}
	

<XML id="testXSL"></XML>
//this is runtime display from view source..i want
//iwantthisvalue to be populated in my textbox

<XML id="testXML">
 
<TESTDATA>
<DETAILS>
<TABLE>
<TEST>iwantthisvalue</TEST>
</TABLE>
</DETAILS>
</TESTDATA>


Thanks

</XML>

--- P Vikram <vikram_good_boy@xxxxxxxxx> wrote:
> Hi
> Iam unable to populate my textbox with value.My code
> is as follows:
> 
> Iam able to get the value with
>
alert(testXML.documentElement.selectSingleNode("//TEST").text);
> 
> <?xml version="1.0" ?>
> <xsl:stylesheet
> xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
> version="1.0"
>                
> xmlns="http://www.w3.org/TR/REC-html40">
> 				
> <xsl:template match="/">
> 	<xsl:apply-templates select="//TESTDATA"/>
> </xsl:template>
> 
> <xsl:template match="TESTDATA">
> 	<xsl:apply-templates select="//DETAILS"/>
> </xsl:template>
> 
> <xsl:template match="DETAILS">
> 	<xsl:apply-templates select="//TABLE"/>
> </xsl:template>
> 
> <xsl:template match="TABLE">
> 
> 		<INPUT maxLength="7" name="test" size="14">
>     <xsl:attribute name="value">
>       <xsl:value-of select="TEST"/>
>     </xsl:attribute>
>   </INPUT>
> </xsl:template>
> 
> </xsl:stylesheet>
> 
> 
> function test() {
> 	
> 	var xslFile;
> 	testXSL.async = false;
> 	xslFile = "test.xsl";
> 	testXSL.load(xslFile);
> 	
> 	rcXSL = titleXSL.parseError.errorCode;
> 	//alert(rcXSL);
> 	tdata = titleXSL.parseError.reason;
> 	//alert(tdata);
> 	rcXML = titleXML.parseError.errorCode;
> 	if (rcXSL+rcXML == 0) 
> 		{
> 		optHTML =
>
testXML.documentElement.transformNode(testXSL.documentElement);
> 		}
> 	
> 	document.all.item("test").innerHTML=optHTML;
> }
> 	
> 
> <XML id="testXSL"></XML>
> //this is runtime display from view source..i want
> //iwantthisvalue to be populated in my textbox
> 
> <XML id="testXML">
>  
> <TESTDATA>
> <DETAILS>
> <TABLE>
> <TEST>iwantthisvalue</TEST>
> </TABLE>
> </DETAILS>
> </TESTDATA>
> 
> 
> Thanks
> 
> </XML>
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> --- David_Marston@xxxxxxxxx wrote:
> > 
> > The problem was originally described as:
> > ><xsl:key name="lookup" match="row"
> > > 
> >
>
use="concat($TRANSFORMER_SourceCountry,'_layer_name')"/>
> > where the variable specifies a country code. After
> > some discussion,
> > it came down to:
> > >So I guess I can not have a dynamic lookup table?
> > 
> > Not that way, but you could define several keys,
> > then dynamically
> > pick which key:
> > 
> > <xsl:key name="US_lookup" match="row"
> > use="US_layer_name"/>
> > <xsl:key name="ES_lookup" match="row"
> > use="ES_layer_name"/>
> > <xsl:key name="CN_lookup" match="row"
> > use="CN_layer_name"/>
> > <xsl:key name="BG_lookup" match="row"
> > use="BG_layer_name"/>
> > then
> >
> ...select=key(concat($country,'_lookup'),$value)...
> > Hope that helps!
> > .................David Marston
> > 
> > 
> >  XSL-List info and archive: 
> > http://www.mulberrytech.com/xsl/xsl-list
> > 
> 
> 
> __________________________________________________
> Do You Yahoo!?
> Get email alerts & NEW webcam video instant
> messaging with Yahoo! Messenger
> http://im.yahoo.com
> 
>  XSL-List info and archive: 
> http://www.mulberrytech.com/xsl/xsl-list
> 


__________________________________________________
Do You Yahoo!?
Get email alerts & NEW webcam video instant messaging with Yahoo! Messenger
http://im.yahoo.com

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


Current Thread
  • Re: Key/Use, (continued)
    • Kevin_Gutch - Wed, 5 Sep 2001 11:46:00 -0400 (EDT)
    • David_Marston - Wed, 5 Sep 2001 14:41:44 -0400 (EDT)
      • P Vikram - Wed, 5 Sep 2001 15:05:00 -0400 (EDT)
        • P Vikram - Wed, 5 Sep 2001 16:16:57 -0400 (EDT) <=
        • Chris Bayes - Wed, 5 Sep 2001 18:08:37 -0400 (EDT)
        • P Vikram - Wed, 5 Sep 2001 18:41:20 -0400 (EDT)
        • Chris Bayes - Wed, 5 Sep 2001 19:01:26 -0400 (EDT)
        • P Vikram - Wed, 5 Sep 2001 20:05:21 -0400 (EDT)

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-2011 All Rights Reserved.