xsl-list
[Top] [All Lists]

Re: [xsl] Filterting an OO document

2007-04-18 12:06:23
On Wed, 18 Apr 2007 20:54:49 +0200
Abel Braaksma <abel(_dot_)online(_at_)xs4all(_dot_)nl> wrote:

Not sure what version of Open Office you are using, but I just did a 
small test with OpenOffice Writer 2.1, and it gives a different 
namespace than you are using:

xmlns:text="urn:oasis:names:tc:opendocument:xmlns:text:1.0"

instead of (yours):

xmlns:text="http://openoffice.org/2000/text";

Meaning that, if that is the case with your input as well, your text:p 
will never match.

Indeed. That helps. However, whenever an HTML tag is emitted the entire
block of xmlns definitions are coped into the output tag. Why is that
and how do I stop it?

Mike

(I just checked older OO format: the 1.0 version uses the same namespace 
you do)

HTH,
-- Abel Braaksma

Michael B Allen wrote:
Hello,

I've used XSLT many times but for some reason I can never remember how
to do it.

If I run xsltproc on the content.xml of an OO document the result is an
empty file. I want to basically filter everything but specific content.

What am I doing wrong?

Mike

<?xml version="1.0" encoding="UTF-8"?>
      
<xsl:stylesheet version="1.0"
    xmlns:xsl="http://www.w3.org/1999/XSL/Transform";
    xmlns:style="http://openoffice.org/2000/style";
    xmlns:text="http://openoffice.org/2000/text";>
      
<xsl:output method="html"
    encoding="UTF-8"
    doctype-public="-//W3C//DTD HTML 4.01 Transitional//EN"/>
     
<xsl:template match="text:p[(_at_)text:style-name='p_5f_prototype']">
<pre>
    <xsl:value-of select="."/>
</pre>
</xsl:template>
     
<xsl:template match="text()|@*">
</xsl:template>
     
</xsl:stylesheet>

  


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



-- 
Michael B Allen
PHP Active Directory Kerberos SSO
http://www.ioplex.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>
--~--

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