[SML] Whether to support Attribute or not?

rev-bob at gotc.com rev-bob at gotc.com
Mon Nov 29 15:47:05 GMT 1999

> >   Consider:   
> >     
> >     <element att="val"> <content/> </element>
> How about this?
> 	<element <att>val</att>> <content/> </element>
> This is for sure not XML/SGML, but it generalizes the recursive
> pattern.  If you want an attribute on the attribute, you write:
> 	<element <att <att-of-att>subvalue</att-of-att>>val</att>>  ...

This might be the right time to note that the iHTML server-side scripting package 
operates in exactly that manner.  An actual scrap of code (from my site) looks like:

<iSET sbit=`<iRANDOM dbname="gotc" table="SQLcode">`>

The main bugaboo in using this structure, at least where iHTML is concerned, concerns 
quotes.  The above works fine, because the back-sq's (a) properly contain the unparsed 
iRANDOM tag and (b) do not appear in the data which replaces that tag.  However, this 
can get really nasty if you're not careful; it helps if you actually break down the recursion 
into successive statements.

 Rev. Robert L. Hood  | http://rev-bob.gotc.com/
  Get Off The Cross!  | http://www.gotc.com/

Download NeoPlanet at http://www.neoplanet.com

xml-dev: A list for W3C XML Developers. To post, mailto:xml-dev at ic.ac.uk
Archived as: http://www.lists.ic.ac.uk/hypermail/xml-dev/ and on CD-ROM/ISBN 981-02-3594-1
To unsubscribe, mailto:majordomo at ic.ac.uk the following message;
unsubscribe xml-dev
To subscribe to the digests, mailto:majordomo at ic.ac.uk the following message;
subscribe xml-dev-digest
List coordinator, Henry Rzepa (mailto:rzepa at ic.ac.uk)

More information about the Xml-dev mailing list