- From: Daniel Brockman <daniel@brockman.nu>
- Date: Fri, 1 Aug 2003 04:57:06 +0200
- To: "mmuguira" <mmuguira@cox.net>, <www-html@w3.org>
Hi Nicholas, I admit I do not fully understand your intention, but it sounds like you want to embed a stylesheet in an XHTML page. That way, you can transform parts of your document "on the fly," and replace your <myns:myhead> element with elements from the XHTML namespace. This method is described in [1]. Alternatively, XSLT has a special syntax [2] that lets you create a stylesheet much like you create an ASP or PHP page: in a sense embedding it in the HTML page. I'm not sure whether this would suit your needs better, but from the sound of it, you ought to go with the former method. I hope this helps, -- Daniel Brockman daniel@brockman.nu [1] XSLT 1.0, Section 2.7: Embedding Stylesheets; http://www.w3.org/TR/xslt#section-Embedding-Stylesheets [2] XSLT 1.0, Section 2.3: Literal Result Element as Stylesheet; http://www.w3.org/TR/xslt#result-element-stylesheet ----- Original Message ----- From: mmuguira To: www-html@w3.org Sent: Friday, August 01, 2003 7:06 AM Subject: Using XML to create a compound element I've been looking for a while now on how to do this, and the closest I've seen to it is defining a new html element in the dtd using xml. I want to define an element, that is essentially only a compound element, essentially doing what I could do with a stylesheet, but I want to do it in place on an html page. For example I would like to define an element "myhead" which would essentially be <xsl:stylesheet> <xsl:template match="myhead"> <head> <title ... / > <meta ... / > <meta ... / > . . . <xsl:value-of> </head> </xsl:template> </xsl:stylesheet> Can I do this without calling an applet or an active x object. Thanks Nicholas Muguira
Received on Thursday, 31 July 2003 22:59:17 UTC