[xsl] Another Special Character Question

Subject: [xsl] Another Special Character Question
From: Spencer Tickner <spencertickner@xxxxxxxxx>
Date: Fri, 20 May 2005 12:06:09 -0700
Hello Everyone, and thanks in Advance for the help,

I'm sure everyone's sick and tired of answering special character
questions, but I am beginning to lose a lot of hair over here.

We have a database of xml files we have converted from html files.
These files are then being pumped out to our customers in a variety of
formats. For the HTML transform (using xsl) the coding I have works
great. However our buisness process requires all these html files to
be lumped into a content collection which are then indexed and such.

The problem is my xml -> html changes &#8212; and other such codes to
there equivalent -- character then the html -> content collection
doesn't know what the heck a -- is and i get the old box character.

I know everyones heard this before, but is there reallly any way to
get &#8212; and others to show in HTML as &#8212;.. Since I know that
our content collection has no problem with this.

Even better, if there is a way to do this, is there any problem with
defining elements in my schema, such as <emdash> so they can outputted
in a variety of forms for diffrent applications, ie &#8212; for html,
<0x02001> for inDesign.

Any suggestions would be appreciated. I'll post all my encoding as I
have a feeling the actual xml, xsl is not that relavent to my problem:

xsl:

<?xml version='1.0' encoding="utf-8"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform";>
	<xsl:output method="html" omit-xml-declaration="yes" encoding="ISO-8859-1"/>
	<!-- ********* Start of Template **************** -->

transform in .net

            Dim outFile As String = cls.htmPath & strAlpha & "\" &
strFileName & ".htm"
            Dim fs As New FileStream(outFile, FileMode.Create)

            'Create the XMLTextWriter for the FileStream
            Dim xtw As New XmlTextWriter(fs, Encoding.Default)
            xtw.Formatting = Formatting.Indented
            xtw.Indentation = 4

            'Transform the XML using the stylesheet
            Dim xmlDoc As XPathDocument = New XPathDocument( _
                cls.xmlPath & strAlpha & "\" & strFileName & ".xml",
XmlSpace.Preserve)

            Dim xlsTran As XslTransform = New XslTransform
            xlsTran.Load(cls.xslTemp)
            xlsTran.Transform(xmlDoc, Nothing, xtw, Nothing)

            xtw.Close()

Current Thread