Subject: RE: [xsl] Xsl in xml From: "Rachid Taji" <rachid.taji@xxxxxxxx> Date: Thu, 31 May 2001 16:20:09 +0200 |
Thank you very much for your Help. I resolve the probleme by using xsl:namespace-alias. Thank you Bob for your document that explain namespace concept: http://www.xml.com/pub/a/2001/04/04/trxml/index.html. Rachid -----Message d'origine----- De : owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx [mailto:owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx]De la part de Rachid Taji Envoyé : mercredi 30 mai 2001 19:41 À : xsl-list@xxxxxxxxxxxxxxxxxxxxxx Objet : RE: [xsl] Xsl in xml thank you for your answer, but I still have a probleme. I add to my root node the namespace declaration xmlns:xsl="http://www.w3.org/1999/XSL/Transform" and it works. But the processor adds this declaration at every node. I did not find how to remove this declaration in the output XSL. below, you will find my example. the processor adds the namespace declaration xmlns:xsl="http://www.w3.org/1999/XSL/Transform" to "center" tag to "p" tag .. Thank you for your response Rachid Xml file ------------------ <?xml version="1.0" encoding="ISO-8859-1"?> <root xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <center> ...... other code <mYlib> </mYlib> </center> <xsl:value-of select="foo"/> <P> </P> </root> Xsl output ------------------ <?xml version="1.0" encoding="ISO-8859-1"?> <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"> <xsl:output .../> <xsl:template match="/otherRoot"> <html> <center xmlns:xsl="http://www.w3.org/1999/XSL/Transform">......</center> <xsl:value-of xmlns:xsl="http://www.w3.org/1999/XSL/Transform" select="foo"/> <P xmlns:xsl="http://www.w3.org/1999/XSL/Transform"/> </html> </xsl:template> </xsl:stylesheet> -----Message d'origine----- De : owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx [mailto:owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx]De la part de cutlass Envoyé : mercredi 30 mai 2001 16:03 À : XSL-List@xxxxxxxxxxxxxxxxxxxxxx Objet : Re: [xsl] Xsl in xml u need to declare a namespace with your xml element that wraps around your xsl <resource xmlns="http://www.w3.org/1999/XSL/Transform"> <-- your xsl here --> </resource> this is a start, u will have to figure out the nuances when u experience them, remember if u use a namespace prefix like xsl: you will have to declare it <?xml version="1.0" encoding="utf-8"?> <resource xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <xsl:import href="test"/> </resource> chow, jim fuller ----- Original Message ----- From: "Rachid Taji" <rachid.taji@xxxxxxxx> To: <XSL-List@xxxxxxxxxxxxxxxxxxxxxx> Sent: Wednesday, May 30, 2001 2:52 PM Subject: [xsl] Xsl in xml > Hello, > > I'm developing a tool that transform an xml file to xsl file by ussing a xsl > file. > I do this to generate xsl files. > > XMLfile + XslFile ---XSLT---> XslFile. > > My question is how can I process an XML file that contains xsl code. > > because when i add a xsl code i have the following error message: > > The namespace prefix "xsl" was not declared. > > > > PS :I used Xercess for parsing and Xalan for processing > > > Thanks you for your Help. > Rachid > > > > XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list > XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
RE: [xsl] Xsl in xml, Rachid Taji | Thread | Re: [xsl] Xsl in xml, Bob DuCharme |
RE: [xsl] XSL and Namespace, Michael Kay | Date | RE: [xsl] XPath, starts with ?, Eric Chappuis |
Month |