xsl-list
[Top] [All Lists]

RE: xml output method

2006-02-26 07:48:44
I should have started by looking at the attributes of xsl:stylesheet (oups). 
Thank you.

"Michael Kay" <mike(_at_)saxonica(_dot_)com> wrote:

Firstly, delete all the namespace declarations except the first two. They
aren't used and aren't needed.

Then add exclude-result-prefixes="w".

Michael Kay
http://www.saxonica.com/

-----Original Message-----
From: jologa(_at_)netscape(_dot_)net [mailto:jologa(_at_)netscape(_dot_)net]
Sent: 26 February 2006 13:38
To: xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com
Subject: [xsl] xml output method

Hi,

I'm using xalan java 2.4.1 under windows. I want to do a very
simple transformation to strip text content from a word xml
file using the following xslt:

<xsl:stylesheet
     xmlns:xsl="http://www.w3.org/1999/XSL/Transform";
    xmlns:w="http://schemas.microsoft.com/office/word/2003/wordml";
    xmlns:v="urn:schemas-microsoft-com:vml"
    xmlns:w10="urn:schemas-microsoft-com:office:word"
    xmlns:sl="http://schemas.microsoft.com/schemaLibrary/2003/core";
    xmlns:aml="http://schemas.microsoft.com/aml/2001/core";
    xmlns:wx="http://schemas.microsoft.com/office/word/2003/auxHint";
    xmlns:o="urn:schemas-microsoft-com:office:office"
    xmlns:dt="uuid:C2F41010-65B3-11d1-A29F-00AA00C14882"

xmlns:text="http://schemas.microsoft.com/office/word/2003/auxHint";
         version="1.0">
<xsl:output standalone="no" method="xml" encoding="UTF-8"/>

<xsl:template match="w:t">
    <text>
        <xsl:value-of select="."/>
    </text>
</xsl:template>
</xsl:stylesheet>


In the output I get the following:

<text
xmlns:text="http://schemas.microsoft.com/office/word/2003/auxH
int" xmlns:dt="uuid:C2F41010-65B3-11d1-A29F-00AA00C14882"
xmlns:o="urn:schemas-microsoft-com:office:office"
xmlns:wx="http://schemas.microsoft.com/office/word/2003/auxHin
t" xmlns:aml="http://schemas.microsoft.com/aml/2001/core";
xmlns:sl="http://schemas.microsoft.com/schemaLibrary/2003/core
" xmlns:w10="urn:schemas-microsoft-com:office:word"
xmlns:v="urn:schemas-microsoft-com:vml"
xmlns:w="http://schemas.microsoft.com/office/word/2003/wordml";
Sample text</text>

and I would like to have

<text>Sanple text</text>

Is it possible to do this?  I've had no luck so far.

Thanks in advance,
José


__________________________________________________________________
Switch to Netscape Internet Service.
As low as $9.95 a month -- Sign up today at
http://isp.netscape.com/register

Netscape. Just the Net You Need.

New! Netscape Toolbar for Internet Explorer
Search from anywhere on the Web and block those annoying pop-ups.
Download now at http://channels.netscape.com/ns/search/install.jsp

--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: 
<mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--





--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: 
<mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--


__________________________________________________________________
Switch to Netscape Internet Service.
As low as $9.95 a month -- Sign up today at http://isp.netscape.com/register

Netscape. Just the Net You Need.

New! Netscape Toolbar for Internet Explorer
Search from anywhere on the Web and block those annoying pop-ups.
Download now at http://channels.netscape.com/ns/search/install.jsp

--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--



<Prev in Thread] Current Thread [Next in Thread>