Return-Path: Delivered-To: apmail-ant-user-archive@www.apache.org Received: (qmail 10082 invoked from network); 8 Dec 2003 21:31:04 -0000 Received: from daedalus.apache.org (HELO mail.apache.org) (208.185.179.12) by minotaur-2.apache.org with SMTP; 8 Dec 2003 21:31:04 -0000 Received: (qmail 83209 invoked by uid 500); 8 Dec 2003 21:30:37 -0000 Delivered-To: apmail-ant-user-archive@ant.apache.org Received: (qmail 83174 invoked by uid 500); 8 Dec 2003 21:30:36 -0000 Mailing-List: contact user-help@ant.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "Ant Users List" Reply-To: "Ant Users List" Delivered-To: mailing list user@ant.apache.org Received: (qmail 83160 invoked from network); 8 Dec 2003 21:30:36 -0000 Received: from unknown (HELO sgtulmg01.sabre.com) (151.193.220.17) by daedalus.apache.org with SMTP; 8 Dec 2003 21:30:36 -0000 Received: from eds.sabre.com (HELO email3) (192.168.133.35) by sgtulmg01.sabre.com with ESMTP; 08 Dec 2003 15:32:41 -0600 X-BrightmailFiltered: true Received: from eds.com ([10.134.61.234]) by eds.sabre.com (iPlanet Messaging Server 5.1 (built May 7 2001)) with ESMTP id <0HPL00D0IIF5GH@eds.sabre.com> for user@ant.apache.org; Mon, 08 Dec 2003 15:30:41 -0600 (CST) Date: Mon, 08 Dec 2003 15:41:31 -0600 From: Will Lopez Subject: Re: AW: XSLT with entities and therefore DOCTYPE In-reply-to: To: Ant Users List Message-id: <3FD4F00B.3000902@eds.com> Organization: EDS MIME-version: 1.0 Content-type: text/plain; charset=ISO-8859-1; format=flowed Content-transfer-encoding: 8BIT X-Accept-Language: en-us, en User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.5) Gecko/20030925 References: X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N A very good XSL list is xsl-list@lists.mulberrytech.com. I don't understand what you're trying to accomplish...can you supply the result you expect (and the input)...real code...this example only has a template to match the root node and it will depend on the built in templates to process the remaining nodes...also, you may just need a variable. Your'e stylesheet declaration is incorrect...see below... Try changing your code from this: ... ...to this **NOT TESTED** -it's been a while since I used XSLT but there are tons of resources on the web... http://www.w3schools.com/xsl/default.asp http://www.w3.org/TR/xslt - W3C spec http://www.zvon.org/HTMLonly/XSLTutorial/Books/Book1/index.html - check this site out ... ..or if you want to use a variable substitute the ENTITY declaration with this: (makes it global due to the declaration spot) then refer to it by using $foo HTH, -Will Antoine L�vy-Lambert wrote: >Hi Mike, > >I am no great XSL expert. > >Did you try the element instead of entities ? >Maybe you are having problems with the xml-apis.jar or the xercesImpl.jar >which is bundled with ant 1.5.3 ? >I am not sure, I hope someone else gives you better ideas. >Otherwise, there are certainly some xml lists where you could ask too. >BTW : the address of this mailing list is user@ant.apache.org >Cheers, >Antoine > >-----Urspr�ngliche Nachricht----- >Von: Mike Castle [mailto:dalgoda@ix.netcom.com] >Gesendet: Montag, 8. Dezember 2003 21:23 >An: ant-user@jakarta.apache.org >Betreff: XSLT with entities and therefore DOCTYPE > > > >I'm not sure if this is something that can be answered on this list. I'm >hoping that at least I can be pointing to a better place to ask. > >I'm delving into XSLT and have developed a transformation that works well >when I use it against xsltproc on my Linux box. So I want to migrate this >to ant to be part of our build process, and I'm running across errors. > >In particular, this example works well: > >demo.xsl: > >xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> > > test > > > >and from build.xml: > > > > >Now, in my real version, I need to use entities, so I change it to >something like this: > > > >]> >xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> > > &foo; > > > >Which works fine with xsltproc, but ant 1.5.3 gives me: > >xslttest: > [xslt] Processing /homedir/mcastle/build.xml to >/homedir/mcastle/results.txt > [xslt] Loading stylesheet /homedir/mcastle/demo.xsl > [xslt] [Error] demo.xsl:5:80: Element type "xsl:stylesheet" must be >declared. > [xslt] [Error] demo.xsl:6:27: Element type "xsl:template" must be >declared. > >BUILD SUCCESSFUL > >Now, it turns out that results.txt actually holds the correct text, which >is great. But that is an awful lot of noise on the screen, particularly >when my real case is much larger. And that noise is distracting. > >So, I've been trying to experiment with xsl:variable, but to no luck. For >example, I really need to do something like the following: > > >xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> > > [test] > > > > > >And I've tried several variations on this technique to no avail. > >So, is there anyway I can get ant to convince XSLT not to validate the >stylesheet, even though it has a DOCTYPE (I really don't want to have to >write a DTD for this thing)? > >Or would anyone know how to hammer xsl:variables into doing what I want? > >Outside of that, where do I go to ask for help (specifically, what would >YOU recommend)? My searches really haven't turned up too much useful >information, but I'm new enough to this that I am probably missing useful >terms that would help. > >Thanks a lot, >mrc >-- > Mike Castle dalgoda@ix.netcom.com www.netcom.com/~dalgoda/ > We are all of us living in the shadow of Manhattan. -- Watchmen >fatal ("You are in a maze of twisty compiler features, all different"); -- >gcc > > > >--------------------------------------------------------------------- >To unsubscribe, e-mail: user-unsubscribe@ant.apache.org >For additional commands, e-mail: user-help@ant.apache.org > > > --------------------------------------------------------------------- To unsubscribe, e-mail: user-unsubscribe@ant.apache.org For additional commands, e-mail: user-help@ant.apache.org