Subject: Re: [xsl] how to use namespaces with xsltproc From: "Joe Fawcett" <joefawcett@xxxxxxxxxxx> Date: Sat, 25 Jan 2003 09:41:31 -0000 |
----- Original Message ----- From: "Pierre François" <pf@xxxxxxxxxxx> To: <XSL-List@xxxxxxxxxxxxxxxxxxxxxx> Sent: Saturday, January 25, 2003 8:31 AM Subject: [xsl] how to use namespaces with xsltproc > I'm trying to extract from an OpenOffice content.xml file > the elements delimited by the <list:item> tag with the > xsltproc program, but it gives the next error message: > > error > xsltCompileStepPattern : no namespace bound to prefix list > compilation error: file ListForAll.xsl line 19 element template > xsltCompilePattern : failed to compile 'list:item' > > Where can I learn about namespaces and what do I have to add > to my xsl stylesheet for performing that? > > ---xsl style sheet------------------------------------- > > <xsl:stylesheet > version="1.0" > xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> > > <xsl:template match="/"> > <html> > <head> > <title>Item List</title> > </head> > <body> > <ul> > <xsl:apply-templates/> > </ul> > </body> > </html> > </xsl:template> > > <xsl:template match="list:item"> > <li> > <xsl:apply-templates/> > </li> > </xsl:template> > > </xsl:stylesheet> > > ------------------------------------------------------- > > Thanks. You can add the namespace information in the stylesheet element after the one there already. You'll need to copy the uri from the xml document. <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:list="uri for list goes here"> Joe XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
[xsl] how to use namespaces with xs, Pierre François | Thread | RE: [xsl] how to use namespaces wit, Pierre François |
[xsl] how to use namespaces with xs, Pierre François | Date | Re: [xsl] document(lang_*.xml)?, Jarkko . Moilanen |
Month |