[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: Dumping a variable
Fantastic, thanks. Regards, Aidan On Sun, 5 Dec 2004 20:35:23 -0800 (PST), Marian Olteanu <mou_softwin@xxxxxxxxx> wrote: > > > > --- Aidan Lister <aidanis@xxxxxxxxx> wrote: > > > Hi Michael, > > > > Dump has certain connotations to a programmer, forgive me for not > > explaining it better. > > > > Dump is a term we use, mainly for debugging, where the raw contents of > > something are "dumped" or displayed to the screen. > > > > My variable contains a nodeset. I want to view the nodeset it contains > > as if it were XML, I don't want the nodeset to be transformed (this is > > what I meant by parsed, sorry). > > > > I tried using message and copy-of, however only the text and not the > > nodeset were displayed. > > > > Hi Marian, > > > > Thanks for your invaluable advice, however variable-dump doesn't seem > > to do anything! > > > > Kind Regards, > > Aidan > > > > XSLT file: > <?xml version="1.0"?> > <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> > <xsl:output method="xml" encoding="utf-8"/> > <xsl:template match="/"> > <xsl:variable name="t" select="//p"/> > <my-normal-output> > <etc>...</etc> > <!-- here you dump variable t--> > <variable-dump name="t"><xsl:copy-of select="$t"/></variable-dump> > </my-normal-output> > </xsl:template> > </xsl:stylesheet> > > XML file: > <root> > <p>test</p> > <a><p>test <b>with bold</b></p></a> > <b><p>test <p>with p</p></p></b> > </root> > > Output: > <?xml version="1.0" encoding="utf-8"?><my-normal-output><etc>...</etc><variable-dump > name="t"><p>test</p><p>test <b>with bold</b></p><p>test <p>with p</p></p><p>with > p</p></variable-dump></my-normal-output> > > ===== > > > Marian > http://www.utdallas.edu/~mgo031000/ > > __________________________________ > Do you Yahoo!? > Yahoo! Mail - You care about security. So do we. > http://promotions.yahoo.com/new_mail
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|