xsl-list
[Top] [All Lists]

RE: [xsl] Identity transform of SP WP not working

2009-02-02 16:14:36
I think that the problem isn't with your XSLT code, but with the way in
which you are running it.

But I don't know anything about Sharepoint (MOSS) etc.

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

-----Original Message-----
From: Dick Penny [mailto:d_penny(_at_)usa(_dot_)net] 
Sent: 02 February 2009 20:00
To: xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com
Subject: [xsl] Identity transform of SP WP not working

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/Dat
aView/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/Dat
aView/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



--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: 
<mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--



--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--

<Prev in Thread] Current Thread [Next in Thread>