QuantumDoja
Programmer
Hi, I have the following XSL, XML and asp code to transform, and all i get is the error:
"System does not support the specified encoding"
any help is GREATLY appreciated.
xml
xsl
asp
"System does not support the specified encoding"
any help is GREATLY appreciated.
xml
Code:
<?xml version="1.0" encoding="UTF-8"?>
<Article>
<TOC>
<Section>
<OrderID>1</OrderID>
<QuickTag>Intoduction</QuickTag>
<SectionID>1</SectionID>
</Section>
<Section>
<OrderID>2</OrderID>
<QuickTag>Setup your array</QuickTag>
<SectionID>2</SectionID>
</Section>
<Section>
<OrderID>3</OrderID>
<QuickTag>Looping your array.</QuickTag>
<SectionID>3</SectionID>
</Section>
</TOC>
<Content>
<Section>
<OrderID>1</OrderID>
<SectionTitle>Intoduction</SectionTitle>
<SectionContent>wegwreg wrg</SectionContent>
<CodeSection></CodeSection>
</Section>
<Section>
<OrderID>2</OrderID>
<SectionTitle>Setup your array</SectionTitle>
<SectionContent>erg erga erg </SectionContent>
<CodeSection></CodeSection>
</Section>
<Section>
<OrderID>3</OrderID>
<SectionTitle>Looping your array.</SectionTitle>
<SectionContent>erg aerg aerg </SectionContent>
<CodeSection></CodeSection>
</Section>
</Content>
<ArticleMedia>
<ArticleImage></ArticleImage>
<ImageCaption></ImageCaption>
<ArticleVideo></ArticleVideo>
<VideoCaption></VideoCaption>
<ArticleDownload></ArticleDownload>
<DownloadCaption></DownloadCaption>
</ArticleMedia>
</Article>
xsl
Code:
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet xmlns:xsl="[URL unfurl="true"]http://www.w3.org/1999/XSL/Transform"[/URL] version="1.0">
<xsl:output media-type="text/xml"/>
<xsl:template match="/">
</xsl:template>
</xsl:stylesheet>
asp
Code:
<%
response.ContentType = "text/xml"
'Response.Expires = 0
'loading an article from the database.
Dim ID
ID = Request.QueryString("ID")
ID = Trim(ID)
'sourceFile = Server.MapPath("genxml.asp?ID="&ID&"")
sourceFile = Server.MapPath("art5.xml")
styleFile = Server.MapPath("Display.xsl")
' set source = Server.CreateObject("Microsoft.XMLDOM")
set objXML = Server.CreateObject("Msxml2.FreeThreadedDOMDocument.3.0")
objXML.async = false
objXML.validateonparse=true
objXML.load(sourceFile)
If objXML.parseError.errorCode <> 0 then
Response.Write(""&objXML.parseError.Reason&"<br />")
Response.Write(""&objXML.parseError.LinePos&"<br />")
Response.Write(""&objXML.parseError.Line&"<br />")
End if
'Response.Write objXML.xml
'set style = Server.CreateObject("Microsoft.XMLDOM")
set style = Server.CreateObject("Msxml2.FreeThreadedDOMDocument.3.0")
style.async = false
style.validateonparse=true
style.load(styleFile)
If style.parseError.errorCode <> 0 then
Response.Write(""&style.parseError.Reason&"<br />")
Response.Write(""&style.parseError.LinePos&"<br />")
Response.Write(""&style.parseError.Line&"<br />")
End if
Response.Write objXML.transformNode(style)
%>