Products

Solutions

Resources

Partners

Community

Blog

About

QA

Ideas Test

New Community Website

Ordinarily, you'd be at the right spot, but we've recently launched a brand new community website... For the community, by the community.

Yay... Take Me to the Community!

Welcome to the DNN Community Forums, your preferred source of online community support for all things related to DNN.
In order to participate you must be a registered DNNizen

HomeHomeDNN Open Source...DNN Open Source...Module ForumsModule ForumsXMLXMLHaving trouble getting started with xsl.. keeps erroringHaving trouble getting started with xsl.. keeps erroring
Previous
 
Next
New Post
5/20/2010 3:03 PM
 

Perhaps i miss understand how to link the xml and the generated xsl.  I am using xml/xsl module. 

xml is linked to exterior url. http://members.whitpres.org/DesktopMo...  using UTF 8.. no passed parameters

Xsl is saved in the generated folder xslstylesheets.  When i cold turkey, (no modifications) create that xsl with forms and list module.. it looks like this

i get this error

System.Xml.XmlException
Root element is missing.

<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:udt="DotNetNuke/UserDefinedTable" exclude-result-prefixes="udt">
  <xsl:output method="xml" indent="yes" omit-xml-declaration="yes" />
  <!--
  This prefix is used to generate module specific query strings
  Each querystring or form value that starts with udt_{ModuleId}_param 
  will be added as parameter starting with param
  -->
  <xsl:variable name="prefix_param">udt_<xsl:value-of select="//udt:Context/udt:ModuleId" />_param</xsl:variable>
  
  <xsl:template match="udt:Data" mode="list">
    <tr>
      <td>
        <a href="{udt:Link_UDT_Url}">
          <xsl:value-of select="udt:Menu_IMG" disable-output-escaping="yes" />
        </a>
      </td>
    </tr>
    <tr height="7px">
      <td> </td>
    </tr>
  </xsl:template>
  
  <xsl:template match="/udt:UserDefinedTable">
    <xsl:variable name="currentData" select="udt:Data" />
    <xsl:if test="$currentData">
      <table>
        <xsl:apply-templates select="$currentData" mode="list">
        </xsl:apply-templates>
      </table>
    </xsl:if>
  </xsl:template>
  
  <xsl:template name="EditLink">
    <xsl:if test="udt:EditLink">
      <a href="{udt:EditLink}">
        <img border="0" alt="edit" src="{//udt:Context/udt:ApplicationPath}/images/edit.gif" />
      </a>
    </xsl:if>
  </xsl:template>
<udt:template listType="table" delimiter=";" listView="<tr>   <td><a href="[Link_UDT_Url]">[Menu_IMG]</a></td> </tr> <tr height="7px">   <td>[ ]</td> </tr>" headerView="" detailView="[UDT:ListView][UDT:EditLink] <table>   <tr>     <td class="normalBold">Title</td>     <td class="Normal">[Title]</td>   </tr>   <tr>     <td class="normalBold">Menu_IMG</td>     <td class="Normal">[Menu_IMG]</td>   </tr>   <tr>     <td class="normalBold">Thumbnail_IMG</td>     <td class="Normal">[Thumbnail_IMG]</td>   </tr>   <tr>     <td class="normalBold">Vertical_IMG</td>     <td class="Normal">[Vertical_IMG]</td>   </tr>   <tr>     <td class="normalBold">Horizontal_IMG</td>     <td class="Normal">[Horizontal_IMG]</td>   </tr>   <tr>     <td class="normalBold">Ministry_Area</td>     <td class="Normal">[Ministry_Area]</td>   </tr>   <tr>     <td class="normalBold">Link</td>     <td class="Normal">[Link]</td>   </tr>   <tr>     <td class="normalBold">Mini_Text</td>     <td class="Normal">[Mini_Text]</td>   </tr>   <tr>     <td class="normalBold">Main_Text</td>     <td class="Normal">[Main_Text]</td>   </tr>   <tr>     <td class="normalBold">Sort_Order</td>     <td class="Normal">[Sort_Order]</td>   </tr>   <tr>     <td class="normalBold">Expires</td>     <td class="Normal">[Expires_UDT_Value]</td>   </tr>   <tr>     <td class="normalBold">IsWorship</td>     <td class="Normal">[IsWorship]</td>   </tr>   <tr>     <td class="normalBold">Created by</td>     <td class="Normal">[Created by]</td>   </tr>   <tr>     <td class="normalBold">Created at</td>     <td class="Normal">[Created at_UDT_Value]</td>   </tr>   <tr>     <td class="normalBold">Changed by</td>     <td class="Normal">[Changed by]</td>   </tr>   <tr>     <td class="normalBold">Changed at</td>     <td class="Normal">[Changed at_UDT_Value]</td>   </tr> </table>" trackingEmail="" />
</xsl:stylesheet>
 
New Post
5/20/2010 9:09 PM
 
Oh UDT XML isnt exactly usable in XML/XSL module.  This is only an issue when you need to put 2 of the exact same module on the same page and use 2 different xslt's to view them.   To work around, i used a 3rd party tabbing module to insert the module from hidden page.  It looks seemless, just a bit ugly on my end, but nobody will know.

UDT exposing their xml past the editors permission level so other modules can pull that data would be nifty. 
 
New Post
5/21/2010 7:56 AM
 
You CANNOT use the ShowXml.aspx from FnL/UDT in the XML module, as that link is only available if the calling user has module edit permissions. The Xml module itself is AllUsers/ Unregistered users.
The very best workaround is using FnL or UDT Datasource available for the reports module and to render it through XSL. There is one handicap as the reports module produces not the same XML as FnL, and therefore the XSL needs to be adjusted.
 
Previous
 
Next
HomeHomeDNN Open Source...DNN Open Source...Module ForumsModule ForumsXMLXMLHaving trouble getting started with xsl.. keeps erroringHaving trouble getting started with xsl.. keeps erroring


These Forums are dedicated to discussion of DNN Platform and Evoq Solutions.

For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:

  1. No Advertising. This includes promotion of commercial and non-commercial products or services which are not directly related to DNN.
  2. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
  3. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
  4. No Flaming or Trolling.
  5. No Profanity, Racism, or Prejudice.
  6. Site Moderators have the final word on approving / removing a thread or post or comment.
  7. English language posting only, please.
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out