Re: XML generator

Colin Paul Adams <[email protected]> Fri, 28 Aug 2009 15:19:23 +0100
Newsgroups gmane.comp.lang.eiffel.gobo.devel
Message-ID <[email protected]>
>>>>> "Jann" == Jann Röder <[email protected]> writes:

    Jann> Hello, I have two problems with the gobo XML library:
    Jann> 1. {XM_NAMESPACE}.make seems to miss the precondition
    Jann> a_prefix /= Void , or there is a bug in
    Jann> {XM_XMLNS_GENERATOR}.on_attribute line "elseif is_implicit
    Jann> (a_prefix)" since if a_prefix is Void a Void call will occur
    Jann> in is_implicit

I'll leave that for Franck to answer.

    Jann> 2. How can I influence the output generated by the pretty
    Jann> printer? For example I'd like it not to add the prefix to
    Jann> every tag and attribute.

    Jann> <tag id="2"> instead of <prefix:tag prefix:id="2">

    Jann> Also I'd like it to use the short form for tags when
    Jann> possible:

    Jann> <tag id="2"/> instead of <tag id="2"></tag>

    Jann> Is this possible somehow or will I have to write my own
    Jann> pretty printer?

There is an XSLT-inspired (*) serializer that you can use if you want full
control over the output. See
http://www.gobosoft.com/eiffel/gobo/xml/xslt/xslt_serializer.html .

It's actually the serializer used by the Gobo XSLT library, but you do
not need to run an XSLT transformation to use it.
-- 
Colin Adams
Preston Lancashire

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july