Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


[xsl] Identity transform of SP WP not working

From: "Dick Penny" <d_penny@------->
To:
Date: 2/2/2009 8:00:00 PM
As a newbie at XSLT and not a guru of anything I cannot get the identity
transforms below to do anything. My environment is IE6.0, SharePoint (MOSS),
SharePointDesigner, no Visual-anything.

Goal: I have a 3rd party WP that works fine. I replaced ALL of its XSLT with
that from MS FAB40 template which does horiz bar graphs. It worked fine which
gave me the confidence to go ahead and mess with the XSLT to produce other
displays. As a first step I thought I should look at the raw stuff being
generated by the WP so that I could write intelligent XSLT.

I have browsed this forum, Mangamo's "Cookbook", Jen Tennison's book and
tried
6-7 variations on the identity transforms below. All I get is a blank, white
page. I also paste snippet below the first 20-30 lines from the XSLT that
successfully display data.

I have mixed the "match line" and the "apply-template" lines, and tried
"copy-of", etc. etc. etc. What am I doing wrong - this has got to be simple.

Again my goal is to see the raw data from the WP so I can write my own XSLT.

===============identity #1 from this forum (namespace no good)
<xsl:stylesheet xmlns:xsl="http://www.w3.org/TR/WD-xsl";>
<xsl:template match="*|comment()|pi(*)">
  <xsl:copy>
    <xsl:process-children/>
  </xsl:copy>
</xsl:template>
</xsl:stylesheet>
=====================end #1

====================identity #2, wwbota xslt transforms lib
 <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
version="1.0">
 <xsl:template match="@*|*|processing-instruction()|comment()">
 <xsl:copy>
  <xsl:apply-templates
select="*|@*|text()|processing-instruction()|comment()" />
  </xsl:copy>
  </xsl:template>
  </xsl:stylesheet>
=====================end #2

=========================identity #3 (full namespaces from display that
works)
<xsl:stylesheet version="1.0" exclude-result-prefixes="xsl msxsl ddwrt"
xmlns:ddwrt="http://schemas.microsoft.com/WebParts/v2/DataView/runtime"
xmlns:asp="http://schemas.microsoft.com/ASPNET/20"
xmlns:__designer="http://schemas.microsoft.com/WebParts/v2/DataView/designer"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:msxsl="urn:schemas-microsoft-com:xslt"
xmlns:SharePoint="Microsoft.SharePoint.WebControls"
xmlns:ddwrt2="urn:frontpage:internal">
<xsl:output method="html" indent="no"/>
<xsl:template match="/">
  <xsl:copy>
    <xsl:apply-templates
select="*|@*|text()|processing-instruction()|comment()" />
    </xsl:copy>
</xsl:template>
</xsl:stylesheet>
======================end #3

=======================snippet WP that works
<xsl:stylesheet version="1.0" exclude-result-prefixes="xsl msxsl ddwrt"
xmlns:ddwrt="http://schemas.microsoft.com/WebParts/v2/DataView/runtime"
xmlns:asp="http://schemas.microsoft.com/ASPNET/20"
xmlns:__designer="http://schemas.microsoft.com/WebParts/v2/DataView/designer"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:msxsl="urn:schemas-microsoft-com:xslt"
xmlns:SharePoint="Microsoft.SharePoint.WebControls"
xmlns:ddwrt2="urn:frontpage:internal">
	<xsl:output method="html" indent="no"/>
	<xsl:decimal-format NaN=""/>
	<xsl:param name="dvt_apos">'</xsl:param>
	<xsl:variable name="dvt_1_automode">0</xsl:variable>
	<xsl:template match="/">
		<xsl:call-template name="dvt_1"/>
	</xsl:template>
	  <xsl:template name="dvt_1">
    <xsl:param name="ParentPath"/>
    <xsl:variable name="dvt_StyleName">Table</xsl:variable>
    <xsl:variable name="Rows" select="/dsQueryResponse/Rows/Row"/>
    <xsl:variable name="dvt_RowCount" select="count($Rows)" />
    <xsl:variable name="IsEmpty" select="$dvt_RowCount = 0" />
    <xsl:call-template name="dvt_1.footer">
      <xsl:with-param name="Rows" select="$Rows" />
    </xsl:call-template>
  </xsl:template>
==========================snippet end

Dick Penny


transparent
Print
Mail
Like It
Disclaimer
.

These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.

.
.

transparent

transparent