[mercury-users] Alternate XML-representation for terms (non-XSLT)?
Ian MacLarty
maclarty at cs.mu.OZ.AU
Tue Jan 31 17:29:32 AEDT 2006
On 31 Jan 2006, at 02:09, doug.auclair at logicaltypes.com wrote:
> Dear all,
>
> I was working with the term_to_xml module and wished to have an
> alternate representation output as the XML (NOT using an XSLT ...
> *shudder*). I attempted to make a write_xml_element/6 using an
> element_pred type. But I am not familiar with type_desc, etc
> necessary to construct the term's representation.
>
> Are there some examples (if not, would someone demonstrate?) that I
> can study so that I can represent a term as an XML element with
> attributes programmatically using a custom transformation?
>
You should use the xmlable typeclass for this. The xmlable typeclass
is only in the version of term_to_xml that comes with the release of
the day, not version 0.12.x.
You can have a look at extras/windows_installer_generator (also in the
rotd) for an example of how to use the xmlable typeclass.
Ian MacLarty.
--------------------------------------------------------------------------
mercury-users mailing list
post: mercury-users at cs.mu.oz.au
administrative address: owner-mercury-users at cs.mu.oz.au
unsubscribe: Address: mercury-users-request at cs.mu.oz.au Message: unsubscribe
subscribe: Address: mercury-users-request at cs.mu.oz.au Message: subscribe
--------------------------------------------------------------------------
More information about the users
mailing list