Date: Tue, 23 Apr 2002 22:46:18 +0300 From: Alexey Zelkin <phantom@ark.cris.net> To: Nik Clayton <nik@freebsd.org> Cc: Murray Stokely <murray@freebsdmall.com>, doc@freebsd.org Subject: Re: html in xml Message-ID: <20020423224618.A99442@ark.cris.net> In-Reply-To: <20020423082441.R30474@canyon.nothing-going-on.org>; from nik@freebsd.org on Tue, Apr 23, 2002 at 08:24:41AM %2B0100 References: <20020420205539.A29136@ark.cris.net> <20020422091454.GF16322@freebsdmall.com> <20020423082441.R30474@canyon.nothing-going-on.org>
next in thread | previous in thread | raw e-mail | index | archive | help
hi, On Tue, Apr 23, 2002 at 08:24:41AM +0100, Nik Clayton wrote: > > > ... > > > <descr>this is a <a href="http://www.host.com/">link</a></descr> > > > ... > > > > > > and xsltproc is converting it to simple text, f.e. > > > > What does the 'a' template look like in your XSLT stylesheet? If it > > is not defined, then the processor will just ignore this element (as > > it should). If you would like to do something with that content, then > > you'll need to write a XSLT template. What XSLT stylesheet are you > > using? This is a stylesheet question, and you shouldn't wrap this > > text in CDATA. > > You can just steal <xsl:template match="a"> from > www/en/news/newsflash.xsl. > > Although, thinking about it, I suspect we should be using namespaces for > this -- this is what I get when I write prototypes while only > understanding a small portion of the spec. > > Then your XML would look something like this: > > <foo xmlns:html="http://.../"> > ... > > ... > > <html:p> ... <html:a href="http://www.example.com/"> > </html:p> > > </foo> > > where "http://.../" is the URI for the HTML spec. I have reviewed w3c's XSLT docs and available examples and decided that following construction better fit my requirements: <xsl:template match="descr"> <xsl:copy-of select="child::node()"/> </xsl:template> It copies whole node content to result tree ASIS. BTW, another few questions: 1. is there any way to set variable with name defined at runtime ? Something like: <xsl:variable name='$var_name' select='xxx'/> 2. is there any way to change variable values ? XSLT specification says that's not possible, but what about xsltproc implementation ? To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-doc" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20020423224618.A99442>