[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

[Fwd: Error Gen'ing XML from HTML]

Subject: [Fwd: Error Gen'ing XML from HTML]
From: Lewis <lewis@xxxxxxxxxxx>
Date: Mon, 30 Oct 2000 14:47:39 -0400 (EST)
invalid xml declaration. error processing
Duh!  CDATA!

-------- Original Message --------
Subject: Error Gen'ing XML from HTML
Date: Mon, 30 Oct 2000 11:54:25 -0500
From: Lewis <lewis@xxxxxxxxxxx>
Organization: NDS
To: xsl-list@xxxxxxxxxxxxxxxx
References: <39F8121A.AAE8300C@xxxxxxxxxxxxxx>
<39F85233.B44663D2@xxxxxxxxxxx> <39F882D0.7C013EC9@xxxxxxxxxxxxxx>

Hi.  What I'm trying to do seems a little bit the reverse of what
everyone else is doing.  I'm taking user input on a generated html page,
using javascript to format an xml file and then calling a stored
procedure on an oracle webserver.  The html file is generated from an
XSQL file (using XSL).

I'm getting an error and I've stripped it down to bare essentials.   It
doesn't matter what XML doc you run it against as I'm not actually using
any of the XML data for this test.  Here's the error I'm getting:

Invalid xml declaration. Error processing resource
'file:///C:/working/smalltest.xsl'. Line 15, Position 21

      ValueXml = "<?xml version='1.0'?>\n";
--------------------^

Even though the PI is in quotes, I get the error.  My xsl file is below.
My question I guess, is how do I embed an xml PI in an xsl stylesheet?

<?xml version="1.0"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
version="1.0">
<xsl:template match="/">

<html>
  <head>

    <script language="javaScript">

    var valueXml;

    function submitForm()
    {
     alert( "In the formSubmit" );
      ValueXml = "<?xml version='1.0'?>\n";
      ValueXml +="<ROWSET><ROW>\n";
      ValueXml +="<CUST_NO>1</CUST_NO>\n";
      ValueXml +="</ROWSET></ROW>\n";

      SubmitForm.docXml.value = ValueXml;
      SubmitForm.submit();
    }

    </script>
  </head>

  <body>
      <form name="submit_form" onclick="submitForm()">
        <input type="submit"/>
        <input type="hidden" name="DocXml"/>
      </form>

 </body>

</html>
</xsl:template>
</xsl:stylesheet>


Thanks for any guidance.


--
Lewis Cunningham
NDS Systems
Tel : 727-538-2250
Mail: lewis@xxxxxxxxxxx
Web : www.ndsapps.com




 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.