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

RE: tags missing in output

Subject: RE: tags missing in output
From: Michael Kay <mike@xxxxxxxxxxxx>
Date: Thu, 13 Aug 2009 22:51:46 +0100
RE:  tags missing in output
Your template rule

<xsl:template match="*" mode="step1">
<xsl:copy-of select="*" />
</xsl:template>

says "copy the children, but don't copy this". Perhaps you wanted
<xsl:copy-of select="." />

Regards,

Michael Kay
http://www.saxonica.com/
http://twitter.com/michaelhkay 
 

> -----Original Message-----
> From: Dick Penny [mailto:d_penny@xxxxxxx] 
> Sent: 13 August 2009 22:35
> To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
> Subject:  tags missing in output
> 
> My input
> ====================
> <dsQueryResponse>
>   <Rows>
>     <Row GroupAssigned="CRA" Source="Other" Status="TBD" 
> FW="14" FM="JUL"
> FQ="2" FY="10" />
>     <Row GroupAssigned="HR" Source="Other" Status="Accept" 
> FW="14" FM="JUL"
> FQ="2" FY="10" />
>     <Row GroupAssigned="CRA" Source="EC_MailBox" 
> Status="Accept" FW="9"
> FM="JUN" FQ="1" FY="10" />
>     <Row GroupAssigned="CRA" Source="EC_MailBox" Status="TBD" 
> FW="9" FM="JUN"
> FQ="1" FY="10" />
>     <Row GroupAssigned="HR" Source="EC_MailBox" Status="Accept" FW="9"
> FM="JUN" FQ="1" FY="10" />
>     <Row GroupAssigned="CRA" Source="Other" 
> Status="VettedOut" FW="9" FM="JUN"
> FQ="1" FY="10" />
>     <Row GroupAssigned="CRA" Source="EC_MailBox" 
> Status="Accept" FW="12"
> FM="JUN" FQ="1" FY="10" />
>     <Row GroupAssigned="HR" Source="Other" Status="Accept" 
> FW="9" FM="JUN"
> FQ="1" FY="10" />
>     <Row GroupAssigned="CRA" Source="Other" Status="Accept" 
> FW="9" FM="JUN"
> FQ="1" FY="10" />
>     <Row GroupAssigned="CRA" Source="EC_MailBox" 
> Status="VettedOut" FW="9"
> FM="JUN" FQ="1" FY="10" />
>     <Row GroupAssigned="CRA" Source="AltertLine" 
> Status="Accept" FW="9"
> FM="JUN" FQ="1" FY="10" />
>     <Row GroupAssigned="HR" Source="AltertLine" 
> Status="VettedOut" FW="9"
> FM="JUN" FQ="1" FY="10" />
>     <Row GroupAssigned="Legal" Source="EC_MailBox" 
> Status="VettedOut" FW="9"
> FM="JUN" FQ="1" FY="10" />
>     <Row GroupAssigned="Legal" Source="Other" Status="Accept" 
> FW="9" FM="JUN"
> FQ="1" FY="10" />
>   </Rows>
> </dsQueryResponse>
> =====================
> 
> My XSLT
> =================================
> <?xml version="1.0" encoding="UTF-8"?>
> <xsl:stylesheet version="1.0"
> xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
>                        
> xmlns:msxsl="urn:schemas-microsoft-com:xslt" > <xsl:output 
> method="xml" version="1.0" encoding="UTF-8" indent="yes" />
> 
> <xsl:template match="/">
> <xsl:variable name="step1out" >
> <xsl:apply-templates select="*" mode="step1" /> 
> </xsl:variable> <xsl:apply-templates 
> select="msxsl:node-set($step1out)" mode="show-all" /> </xsl:template>
> 
> <xsl:template match="*" mode="step1">
> <xsl:copy-of select="*" />
> </xsl:template>
> 
> <xsl:template match="*" mode="show-all"> <xmp><xsl:copy-of 
> select="*" /></xmp> </xsl:template> </xsl:stylesheet> 
> =====================================
> 
> My output by running above in XML NotePad 2007 
> ===========================================
> <Row GroupAssigned="CRA" Source="Other" Status="TBD" FW="14" 
> FM="JUL" FQ="2"
> FY="10" />
>   <Row GroupAssigned="HR" Source="Other" Status="Accept" 
> FW="14" FM="JUL"
> FQ="2" FY="10" />
>   <Row GroupAssigned="CRA" Source="EC_MailBox" 
> Status="Accept" FW="9" FM="JUN"
> FQ="1" FY="10" />
>   <Row GroupAssigned="CRA" Source="EC_MailBox" Status="TBD" 
> FW="9" FM="JUN"
> FQ="1" FY="10" />
>   <Row GroupAssigned="HR" Source="EC_MailBox" Status="Accept" 
> FW="9" FM="JUN"
> FQ="1" FY="10" />
>   <Row GroupAssigned="CRA" Source="Other" Status="VettedOut" 
> FW="9" FM="JUN"
> FQ="1" FY="10" />
>   <Row GroupAssigned="CRA" Source="EC_MailBox" Status="Accept" FW="12"
> FM="JUN" FQ="1" FY="10" />
>   <Row GroupAssigned="HR" Source="Other" Status="Accept" 
> FW="9" FM="JUN"
> FQ="1" FY="10" />
>   <Row GroupAssigned="CRA" Source="Other" Status="Accept" 
> FW="9" FM="JUN"
> FQ="1" FY="10" />
>   <Row GroupAssigned="CRA" Source="EC_MailBox" 
> Status="VettedOut" FW="9"
> FM="JUN" FQ="1" FY="10" />
>   <Row GroupAssigned="CRA" Source="AltertLine" 
> Status="Accept" FW="9" FM="JUN"
> FQ="1" FY="10" />
>   <Row GroupAssigned="HR" Source="AltertLine" 
> Status="VettedOut" FW="9"
> FM="JUN" FQ="1" FY="10" />
>   <Row GroupAssigned="Legal" Source="EC_MailBox" 
> Status="VettedOut" FW="9"
> FM="JUN" FQ="1" FY="10" />
>   <Row GroupAssigned="Legal" Source="Other" Status="Accept" 
> FW="9" FM="JUN"
> FQ="1" FY="10" />
> ================================
> 
> My question
> ==================
> I am trying to learn "step-wise" transformations, thus my 
> first example is to do nothing.
> What happened to the two missing element levels <dsQueryResponse>
>   <Rows>
> I am expecting to see them.
> ===================
> 
> Dick Penny

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.