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

XSLT with DOM

  • From: sunker@t...
  • To: "'xml-mailinglist'" <xml-dev@i...>
  • Date: Thu, 9 Dec 1999 10:39:54 +0800

with dom xslt
Hi all,

I got a problem with Dom doc with xsl transform

in my xml i included the DTD with the entity references to some file process such as test.asp, (i parse with GenXMLToHTML(xml,xsl)) when it display to the web browser, its blank...!!.
but when i include stylesheet directly to xml file it work properly. why ?.. Is it possible xml cannot load the process under process ? or the xsl is worst processor ?

for more info this the example:

DOM TRANS XML TO HTML:
function GenXMLToHTML(xmlf,xslf)
{
   xmlfile = new ActiveXObject("Microsoft.XMLDOM");
   xmlfile.async = false;
   xmlfile.validateOnParse = false;
   xmlfile.load(Server.MapPath(xmlf));

   xslfile = new ActiveXObject("Microsoft.XMLDOM");	
   xslfile.async = false;
   xslfile.validateOnParse = false;
   xslfile.load(Server.MapPath(xslf));
   
   Response.Write(xmlfile.transformNode(xslfile));
}

=======================================
XML FILENAME = TEST.XML
<?xml version="1.0"?>
<!DOCTYPE TRADING[
<!ELEMENT TRADING (Roots?)>
<!ELEMENT Roots (Pale*)>
<!ELEMENT Pale (#PCDATA)>
<!ENTITY port SYSTEM "test.asp">
]> 
<TRADING>
   &port;
</TRADING> 
=======================================

XSL FILENAME = TEST.XSL
<xsl:stylesheet xmlns:xsl="http://www.w3.org/TR/WD-xsl"
xmlns="http://www.w3.org/TR/REC-html40" result-ns="HTML">

<xsl:template match="/">
      <HTML>
         <HEAD>
            <TITLE>Account</TITLE>
            <META NAME="description" CONTENT="Member Account"/>
			<META NAME="keywords" CONTENT="Account"/>
			<META NAME="Author" CONTENT="Sunker"/>
			<META NAME="generator" CONTENT="XHTML 5.00.2314.1000"/>
			<META HTTP-EQUIV="no-cache"/>
			<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=windows-1252"/>
			<META HTTP-EQUIV="Content-Script-Type" CONTENT="text/javascript"/>
			<META HTTP-EQUIV="Content-Style-Type" CONTENT="text/css"/>
			<META HTTP-EQUIV="Window-target" CONTENT="main"/>
         </HEAD>
         <BODY>
         <xsl:apply-templates select="TRADING/Roots/Pale"/>
         </BODY>
      </HTML>  
</xsl:template>

<xsl:template match="TRADING/Roots/Pale">
   <DIV STYLE="COLOR:BLUE;FONT-WEIGHT:BOLD">
     <xsl:eval>childNumber(this)</xsl:eval>-<Span><xsl:value-of select="."/></Span>
   </DIV>
</xsl:template>

</xsl:stylesheet>

=======================================
ASP FILENAME = TEST.ASP
<%@  Language=JScript %>
<%Response.ContentType="text/xml"
msg = '<Roots>'
 for (var i=0;i<100;i++){
   msg+='<Pale>Pxc'+i+'</Pale>';
 }
 msg+='</Roots>';
Response.Write (msg);
%>

thanks
Sunker
(this's xml page generate by GENXMLTOHTML http://www.geocities.com/researchtriangle/campus/7211)

winmail.dat


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
 

Stylus Studio has published XML-DEV in RSS and ATOM formats, enabling users to easily subcribe to the list from their preferred news reader application.


Stylus Studio Sponsored Links are added links designed to provide related and additional information to the visitors of this website. they were not included by the author in the initial post. To view the content without the Sponsor Links please click here.

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.