Subject: XForms & XSLT
Posted By: kwilliams Post Date: 1/23/2007 5:29:27 PM
I'm trying to learn about the use of XForms with XSLT, and I'm having some difficulties figuring it out. My site transforms an XML and XSLT doc into a resulting HTML doc using the following ASP.NET code:
<%@ Page Language="VB" ContentType="text/html" ResponseEncoding="iso-8859-1" AspCompat="true" Debug="true" %>
<%@ import Namespace="System.Web" %>
<%@ import Namespace="System.Web.UI" %>
<%@ import Namespace="System.Web.UI.WebControls" %>
<%@ import Namespace="System.Web.UI.HtmlControls" %>
<%@ import Namespace="System.Xml" %>
<%@ import Namespace="System.Xml.Xsl" %>
<%@ import Namespace="System.Xml.XPath" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<script language="vb" runat="server">
    Sub Page_Load(ByVal sender As Object, ByVal e As EventArgs)
        xslTransform.DocumentSource = "xmldoc.xml"
        xslTransform.TransformSource = "xsldoc.xsl"
    End Sub
</script>
<html>
<body>
<form id="form1" runat="server">
        <div id="wrapper">
            <asp:Xml id="xslTransform" runat="server"></asp:Xml>
        </div><!--end wrapper-->
</form>
</body>
</html>


I want to create forms for the site, and I'd like to look into using XForms for this purpose. Is it the best solution for my setup? Also, if someone could point me in the right direction to some simple XForm examples, that would be great. Thanks.

P.S. My site uses a XSLT 1.0 Processor.

KWilliams
Reply By: kwilliams Reply Date: 1/25/2007 10:07:43 AM
Wow, no replies. Well, I'll try again in a more straightforward manner:

1) Can I use XForms with an ASP.NET transformation of XML/XSLT docs (see code in previous post)?
2) If so, where would some good resources be of this setup?
3) If not, what would be an alternative solution?

Thanks for any help.

KWilliams
Reply By: mhkay Reply Date: 1/25/2007 10:23:01 AM
Sadly this forum doesn't have a very stable membership. People come to ask a question and then disappear. As a result, not many people are answering questions, and if those people happen to be busy on a particular day, it's not uncommon to get no answer. I try to answer XSLT questions when I can; but for some reason the forum seems to attract a high proportion of queries that are specific to Microsoft technologies, and I'm no expert in those areas.

You can use XSLT to generate any XML, HTML, or XHTML document and that of course includes one that uses XForms elements. You can do that whether or not your XSLT transformation is driven from ASP pages. But of course, there's no point generating XForms elements unless there is an XForms processor somewhere to handle them. That can be a client-side or a server side XForms engine - but if you want to know more about XForms, then an XSLT forum isn't the best place to ask.

Michael Kay
http://www.saxonica.com/
Author, XSLT Programmer's Reference and XPath 2.0 Programmer's Reference
Reply By: kwilliams Reply Date: 1/25/2007 10:28:03 AM
Hi Michael,

Thanks for the quick reply. I'm just trying to get my mind around what the best solution would be to create and edit forms with my setup. I'll add my post to the XML forum per your suggestion. Thanks Michael.

KWilliams

Go to topic 55381

Return to index page 53
Return to index page 52
Return to index page 51
Return to index page 50
Return to index page 49
Return to index page 48
Return to index page 47
Return to index page 46
Return to index page 45
Return to index page 44