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

Transformating a XML document with XSL document

Subject: Transformating a XML document with XSL document
From: "Eder de Oliveira" <eder@xxxxxxxxxxxxx>
Date: Thu, 15 Jan 2004 09:17:56 -0300
xsl document
Hi people,

I have a problem, Can anyone help me?

I am trying Transformation a XML document with XSL document, using parser
MSXML3 the Microsoft. But the problem is, Last the transformation, the
finish of elements have a one empty space or white space, So I can't
validate the output document, using a XSD document.
If I use the parser MSXML4, this problem don't happen.

Exemple XSL document that I am using:

<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"

xmlns="http://www.cnpq.br/2002/XSD/lattes"

xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">

<xsl:output method="xml" encoding="ISO-8859-1" indent="yes"/>

<xsl:template match="*[name()= 'CURRICULO-VITAE']">
    <xsl:element name="CURRICULO-VITAE"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
        <xsl:attribute name="xsi:schemaLocation"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">http://www.cnpq.br/200
2/XSD/lattes
C:\Lattes\Curriculo\LMPL\XSD\LMPLCurriculo.xsd</xsl:attribute>
        <xsl:apply-templates select="@*"/>
        <xsl:apply-templates/>
    </xsl:element>
</xsl:template>

<xsl:template match="*[name()!= 'CURRICULO-VITAE']">
    <xsl:element name="{name()}">
        <xsl:apply-templates select="@*"/>
        <xsl:apply-templates/>
    </xsl:element>
</xsl:template>

<xsl:template match="@*">
    <xsl:if test=". !=''">
        <xsl:attribute name="{name()}">
            <xsl:value-of disable-output-escaping="yes" select="."/>
        </xsl:attribute>
    </xsl:if>
</xsl:template>

</xsl:stylesheet>

Can anyone help me?
This XSL document above, attend to clear empty attributes in XML document.

Thanks
Eder



 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Current Thread

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
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.