Re: [xsl] create xml from incoming xml and load it into a variable

Subject: Re: [xsl] create xml from incoming xml and load it into a variable
From: sudheshna iyer <sudheshnaiyer@xxxxxxxxx>
Date: Tue, 29 Jul 2008 03:30:18 -0700 (PDT)
Thank you for the reply.

If I use 		
	<xsl:message>
		var: <xsl:copy-of select="$var"/>
	</xsl:message>	
It only prints the following for the below mentioned xml:

112005-08-26aaaaaaaaaa11111222005-08-26bbbbb112005-08-26ccccc112005-08-26dddddddddd11111

For the xml:
<?xml version="1.0" encoding="UTF-8"?>
<root>    
    <subroot id="11111">
        <ccc>11</ccc>
        <ddd>2005-08-26</ddd>
        <eee>aaaaa</eee>
         <eee>aaaaa11111</eee>
    </subroot>
    <subroot id="11111">
        <ccc>22</ccc>
        <ddd>2005-08-26</ddd>
        <eee>bbbbb</eee>
    </subroot>
    <subroot id="11111">
        <ccc>11</ccc>
        <ddd>2005-08-26</ddd>
        <eee>ccccc</eee>
    </subroot>
    <subroot id="11111">
        <ccc>11</ccc>
        <ddd>2005-08-26</ddd>
        <eee>ddddd</eee>
        <eee>ddddd11111</eee>        
    </subroot>    
</root> 

I want to see the complete xml, just like the input xml along with element names.

For eg:
<root>
	<ccc>11</ccc>
	<ddd>2005-08-26</ddd>
	<eee>aaaaa</eee>
	<eee>aaaaa11111</eee>
         ...
         
with the hiearchy preserved. I am debugging larger xsl file and I don't know whether result-tree in the memory is constructed right or not.

Thank you.


--- On Tue, 7/29/08, Florent Georges <lists@xxxxxxxxxxxx> wrote:

> From: Florent Georges <lists@xxxxxxxxxxxx>
> Subject: Re: [xsl] create xml from incoming xml and load it into a variable
> To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
> Date: Tuesday, July 29, 2008, 5:57 AM
> sudheshna iyer wrote:
> 
>   Hi
> 
> > In the below xsl, how do I see the entire xml that is
> in
> > variable "var"?
> 
>   What do you mean exactly?  If you want to "see"
> it in the result
> tree, use xsl:sequence or xsl:copy-of:
> 
>     <bla-bla>
>        <xsl:copy-of select="$var"/>
>     </bla-bla>
> 
>   If you want to "see" it on the console (or
> whatever your environment
> directs messages to), for debugging purpose, you can use
> xsl:messages:
> 
>     <xsl:message select="$var"/>
>     <!-- or... -->
>     <xsl:message>
>        VAR: <xsl:copy-of select="$var"/>
>     </xsl:message>
> 
>   Regards,
> 
> --drkm
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
>      
> _____________________________________________________________________________
> 
> Envoyez avec Yahoo! Mail. Une boite mail plus intelligente
> http://mail.yahoo.fr

Current Thread