View Single Post
  #3 (permalink)  
Old November 28th, 2008, 05:44 AM
mswin mswin is offline
Registered User
Join Date: Nov 2008
Location: , , .
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts


Here are the xml and xslt that I am using:

 <?xml version="1.0" encoding="iso-8859-1" ?>
  <name>XYZ Inc.</name>
  <address1>One Abc Way</address1>
  <address2>Some avenue</address2>
  <city>Tech city</city>


    - XSLT is a template based language to transform Xml documents
    It uses XPath to select specific nodes
    for processing.

    - A XSLT file is a well formed Xml document


<xsl:output method="html" />

        Main template to kick off processing our Sample.xml
        From here on we use a simple XPath selection query to
        get to our data.
    <xsl:template match="/">



                <title>Welcome to <xsl:value-of select="/company/name"/></title>

                    body,td {font-family:Tahoma,Arial; font-size:9pt;}


                <h2>Welcome to <xsl:value-of select="/company/name"/></h2>
                <b>Our contact details:</b>
                <xsl:value-of select="/company/name"/>
                <xsl:value-of select="/company/address1"/>
                <xsl:value-of select="/company/address2"/>
                <xsl:value-of select="/company/city"/>
                <xsl:value-of select="/company/country"/>
                <xsl:value-of select="Ø"/>





I am using XSLTCompiledTransform in C#, and writing result to html file.

Even I added encoding to the xml file it doesn't work. Still I get the same error.

Many thanks for further help on this.
Reply With Quote