cancel
Showing results for 
Search instead for 
Did you mean: 

ASP.Net child page with XSLT

stephenr85
Champ in-the-making
Champ in-the-making
I am trying to generate an ASP.net child page with a Web Form content type. Here are the issues I'm having:

    1. The Page directive has no namespace or closing tag, and is therefore "malformed". When I place it in a CDATA, the angle brackets are converted to </>.
    2. The name spaces are being inserted into each of the "asp:Content" (content placeholder) tags.
Here is the generated .aspx file's contents:

<%@ Page Language="C#" MasterPageFile="~/master/pages/sub.master" Title="" %>

<asp:Content xmlns:asp="http://www.microsoft.com/" xmlns:xhtml="http://www.w3.org/1999/xhtml" xmlns:ktbu="http://ktbu/" xmlns:fn="http://www.w3.org/2005/02/xpath-functions" Runat="Server" ID="cLeftNav" ContentPlaceHolderID="cphLeftNav">
<asp:Xml runat="server" TransformSource="/master/form/secondary-nav.xsl" ID="xmlSecondaryNav" DocumentSource="/test-nav.xml"/>
</asp:Content>
<asp:Content xmlns:asp="http://www.microsoft.com/" xmlns:xhtml="http://www.w3.org/1999/xhtml" xmlns:ktbu="http://ktbu/" xmlns:fn="http://www.w3.org/2005/02/xpath-functions" Runat="Server" ID="cAdsLeft" ContentPlaceHolderID="cphAdsLeft">
<h1>test title</h1>
</asp:Content>

The ideal solution would be to control this from the XSL. If that's not possible, I'd like to be able to parse the XSL output before the aspx file is generated. This technique is shown here: http://www.codeproject.com/KB/XML/xmlxsltransformer.aspx (look for the "get transformed results" comment).

Thanks to anyone that can help! - Stephen
2 REPLIES 2

jbarmash
Champ in-the-making
Champ in-the-making
It sounds like you are trying to author ASP.NET pages using Alfresco WCM Forms.  I am really curious why you are trying to do this.

Typically, you use Alfresco WCM to author XML documents (content), which are then read by ASP.NET pages using XML techniques. 

This allows you to separate content (XML) from presentation.

Let me know if I am misunderstanding something here - just want to validate that you understand the recommended way and "breaking the rules" for a reason.

kvc
Champ in-the-making
Champ in-the-making
Exciting that you are using Alfresco for creating and managing your .NET site … love this!  (and you should look at 2.2E … we added a new test server capability so that
your users and reviewers can "check-out" a remote server, sync via deployment, and than do an in-context preview - which was designed in part to support people using
us for a .NET site, because the Virtualization Server necessarily only works for static websites and Java-based websites).

Can you file a support case on this?  If there's a bug, I'd like to get to the bottom of it and resolve.  We need more people using us for websites running different site
architectures!

Kevin
Getting started

Tags


Find what you came for

We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.