W3C home > Mailing lists > Public > www-html@w3.org > July 2003

Re: Using XML to create a compound element

From: Daniel Brockman <daniel@brockman.nu>
Date: Fri, 1 Aug 2003 04:57:06 +0200
Message-ID: <025201c357d8$97c52ce0$64b670d5@wigwam>
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

[1] XSLT 1.0, Section 2.7: Embedding Stylesheets;
[2] XSLT 1.0, Section 2.3: Literal Result Element as 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:template match="myhead">
      <title ... / >
      <meta ... / >
      <meta ... / >

Can I do this without calling an applet or an active x object.

Nicholas Muguira
Received on Thursday, 31 July 2003 22:59:17 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 7 January 2015 15:06:04 UTC