LeKuchen: xsl:output encoding

Beitrag lesen

Serverseitige Sprache:

eine einfache asp-Datei...

  
<%  
Response.AddHeader "cache-control", "private"  
Response.AddHeader "pragma", "no-cache"  
Response.ExpiresAbsolute = #January 1, 1980 00:00:00#  
Response.Expires=0  
response.ContentType="image/svg+xml"  
  
Dim xmldoc  
Dim xsldoc  
  
'Use the MSXML 4.0 Version dependent PROGID  
'MSXML2.DOMDocument.4.0 if you wish to create  
'an instance of the MSXML 4.0 DOMDocument object  
  
Set xmldoc = Server.CreateObject("MSXML2.DOMDocument")  
Set xsldoc = Server.CreateObject("MSXML2.DOMDocument")  
  
xmlFile=Server.MapPath(Request.QueryString("xml") & ".xml")  
xmldoc.Load xmlFile  
  
'Check for a successful load of the XML Document.  
if xmldoc.parseerror.errorcode <> 0 then  
  Response.Write "Error loading XML Document :" & xmlFile & "<BR>"  
  Response.Write "----------------------------" & "<BR>"  
  Response.Write "Error Code : " & xmldoc.parseerror.errorcode & "<BR>"  
  Response.Write "Reason : " & xmldoc.parseerror.reason & " at " & xmldoc.parseError.Line & "<BR>"  
  Response.End  
End If  
  
xslFile=Server.MapPath(Request.QueryString("xsl") & ".xsl")  
xsldoc.Load xslFile  
  
'Check for a successful load of the XSL Document.  
if xsldoc.parseerror.errorcode <> 0 then  
  Response.Write "Error loading XSL Document :" & xslFile & "<BR>"  
  Response.Write "----------------------------" & "<BR>"  
  Response.Write "Error Code : " & xsldoc.parseError.errorcode & "<BR>"  
  Response.Write "Reason : " & xsldoc.parseError.reason & " at " & xsldoc.parseError.Line & "<BR>"  
  Response.End  
End If  
  
Response.Write xmldoc.TransformNode(xsldoc)  
  
Set xmldoc = nothing  
Set xsldoc = nothing  
%>