comp.lang.ada
 help / color / mirror / Atom feed
* XML/HTML DOM in Ada
@ 2001-03-04  1:20 Peter Hend�n
  2001-03-07 20:28 ` Stephen Leake
  0 siblings, 1 reply; 7+ messages in thread
From: Peter Hend�n @ 2001-03-04  1:20 UTC (permalink / raw)


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 1165 bytes --]

I have been thinking about implementing the DOM in Ada. The
with'ing problem makes separating the type definitions difficult.
Of course one could make everything a Node (as is indeed
allowed according to the DOM rec.), but this makes information
and implementation hiding just as "jumbled" as declaring all
node types in one package.

My current method is that I make all node types (derived from
base type Node (is new Controlled with private)) have primitive
operations that take an in out DerivedFromNode, and use
Volan's generic package Forward (described in
http://home.bluemarble.net/~jvolan/WithingProblem/FAQ.html)
to construct forwarding references to other Node types.

While this solution is straight forward:-) and relatively easy to
implement, I don't really like the fact that the user needs to
know about two access types for each node type as well as
nowing to use the conversion operator (+) at the proper times.

Has anyone else given this any thought? Am I over the top here?
Is there a better way?

Regards,
Peter
--
Peter Hend�n           http://www.algonet.se/~phenden
ICQ: 14672398
Teknisk Dokumentation AB          http://www.tdab.com





^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: XML/HTML DOM in Ada
  2001-03-04  1:20 XML/HTML DOM in Ada Peter Hend�n
@ 2001-03-07 20:28 ` Stephen Leake
  2001-03-10 15:24   ` Peter Hend�n
  0 siblings, 1 reply; 7+ messages in thread
From: Stephen Leake @ 2001-03-07 20:28 UTC (permalink / raw)


"Peter Hend�n" <phenden@tdab.com> writes:

> I have been thinking about implementing the DOM in Ada. The
> with'ing problem makes separating the type definitions difficult.

GNAT offers a solution: "with type foo;". This is under discussion as
an addition to Ada; give it a try, and encourage your other compiler
vendors to implement it!

"with type" is documented in the JGNAT user guide, but is implemented
in standard GNAT as well.

-- 
-- Stephe



^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: XML/HTML DOM in Ada
  2001-03-07 20:28 ` Stephen Leake
@ 2001-03-10 15:24   ` Peter Hend�n
  2001-03-12 18:05     ` Stephen Leake
  0 siblings, 1 reply; 7+ messages in thread
From: Peter Hend�n @ 2001-03-10 15:24 UTC (permalink / raw)


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 1103 bytes --]

"Stephen Leake" wrote:
> "Peter Hend�n" writes:

> > I have been thinking about implementing the DOM in Ada. The
> > with'ing problem makes separating the type definitions difficult.

> GNAT offers a solution: "with type foo;". This is under discussion as
> an addition to Ada; give it a try, and encourage your other compiler
> vendors to implement it!
Thanks, Stephen, just what I needed.

I have tried this out in a couple of small-ish pilot projects, and I can
say that it solves the few problems I've seen with Ada as an OO
language.

Does anyone know where the "official" discussions stand with
regard to the various solutions proposed to the with-ing problem?

> "with type" is documented in the JGNAT user guide, but is implemented
> in standard GNAT as well.
I've also come up against a bug in GNAT (at least that's what GNAT
itself claims). Is there a publically available known bug list, so I could
check against it before I submit a report?

Regards,
Peter

--
Peter Hend�n           http://www.algonet.se/~phenden
ICQ: 14672398
Teknisk Dokumentation AB          http://www.tdab.com





^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: XML/HTML DOM in Ada
  2001-03-10 15:24   ` Peter Hend�n
@ 2001-03-12 18:05     ` Stephen Leake
  2001-03-12 23:19       ` Erik Sigra
                         ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Stephen Leake @ 2001-03-12 18:05 UTC (permalink / raw)


"Peter Hend�n" <phenden@tdab.com> writes:


> <snip> 
> Does anyone know where the "official" discussions stand with
> regard to the various solutions proposed to the with-ing problem?

There is an Ada Issue on this, at
http://www.adaic.org/standards/95com/ada-issues/ somewhere, but I
can't remember the number right now, and I can't find it in
ai-summary.txt. Maybe you have time to do a better search.

> > I've also come up against
> > a bug in GNAT (at least that's what GNAT > itself claims). Is
> > there a publically available known bug list, so I could > check
> > against it before I submit a report?

No public list. Just send it in to report@gnat.com; they are in a
better position to decide whether it is a known bug or not. Try to
send a complete executable program that demonstrates the bug; they'll
run it against their latest internal build to see if it is currently
fixed.
-- 
-- Stephe



^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: XML/HTML DOM in Ada
  2001-03-12 18:05     ` Stephen Leake
@ 2001-03-12 23:19       ` Erik Sigra
  2001-03-13 18:38       ` Tucker Taft
  2001-03-13 19:09       ` Randy Brukardt
  2 siblings, 0 replies; 7+ messages in thread
From: Erik Sigra @ 2001-03-12 23:19 UTC (permalink / raw)
  To: comp.lang.ada, Stephen Leake

[-- Attachment #1: Type: text/plain, Size: 2341 bytes --]

m�ndagen den 12 mars 2001 19:05 skrev Stephen Leake:
> "Peter Hend�n" <phenden@tdab.com> writes:
> > <snip>
> > Does anyone know where the "official" discussions stand with
> > regard to the various solutions proposed to the with-ing problem?
>
> There is an Ada Issue on this, at
> http://www.adaic.org/standards/95com/ada-issues/ somewhere, but I
> can't remember the number right now, and I can't find it in
> ai-summary.txt. Maybe you have time to do a better search.
>
> > > I've also come up against
> > > a bug in GNAT (at least that's what GNAT > itself claims). Is
> > > there a publically available known bug list, so I could > check
> > > against it before I submit a report?
>
> No public list. Just send it in to report@gnat.com; they are in a
> better position to decide whether it is a known bug or not. Try to
> send a complete executable program that demonstrates the bug; they'll
> run it against their latest internal build to see if it is currently
> fixed.

Is it the same bug I got today? Here is my report:


I typed "gnatmake -gnatX foo" and got this:
--------------------------------8<------------------------------------------
gnatgcc -c -gnatX foo.ads
gnatgcc -c -gnatX bar.adb
+===========================GNAT BUG DETECTED==============================+
| 3.13p  (20000509) (i386-Ada-linux) Storage_Error stack overflow (or 

erroneous memory access)|
| Error detected at 

/usr/lib/gcc-lib/i386-Ada-linux/2.8.1/adainclude/a-tags.adb:42:17|
| Please submit bug report by email to report@gnat.com.                    |
| Include the entire contents of this bug box in the report.               |
| Include the exact gnatgcc or gnatmake command that you entered.          |
| Also include sources listed below in gnatchop format                     |
| (concatenated together with no headers between files).                   |
| (use plain ASCII or MIME attachment).                                    |
| See gnatinfo.txt for full info on procedure for submitting bugs.         |

+==========================================================================+
 
Please include these source files with error report
 
bar.ads
bar.adb
foo.ads
 
compilation abandoned
gnatmake: "bar.adb" compilation error
--------------------------------8<------------------------------------------

All code is in the file "all".

[-- Attachment #2: all --]
[-- Type: text/plain, Size: 531 bytes --]

with Foo;
package body Bar is
   procedure E (T : in Foo.APointer) is begin null;
   end E;
end Bar;
with type Foo.APointer is access;
package Bar is
   type N is abstract tagged null record;
   type NClassPointer is access all N'Class;
   type NNode;
   type NList is access NNode;
   type NNode is record
      Next : NList;
      Data : NClassPointer;
   end record;
   procedure E (T : in Foo.APointer);
end Bar;
with Bar;
package Foo is
   type A is record B : Bar.NList;
   end record;
   type APointer is access A;
end Foo;

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: XML/HTML DOM in Ada
  2001-03-12 18:05     ` Stephen Leake
  2001-03-12 23:19       ` Erik Sigra
@ 2001-03-13 18:38       ` Tucker Taft
  2001-03-13 19:09       ` Randy Brukardt
  2 siblings, 0 replies; 7+ messages in thread
From: Tucker Taft @ 2001-03-13 18:38 UTC (permalink / raw)


Stephen Leake wrote:
> 
> "Peter Hend�n" <phenden@tdab.com> writes:
> 
> > <snip>
> > Does anyone know where the "official" discussions stand with
> > regard to the various solutions proposed to the with-ing problem?
> 
> There is an Ada Issue on this, at
> http://www.adaic.org/standards/95com/ada-issues/ somewhere, but I
> can't remember the number right now, and I can't find it in
> ai-summary.txt. Maybe you have time to do a better search.

It is AI95-00217, available at:
    http://www.ada-auth.org/cgi-bin/cvsweb.cgi/AIs/AI-00217.TXT?rev=1.7

An overall (html-ized) index of AIs is now available (thanks, Randy!) at:
    http://www.ada-auth.org/AI-SUMMARY.HTML

-- 
-Tucker Taft   stt@avercom.net   http://www.averstar.com/~stt/
Chief Technology Officer, AverCom Corporation (A Titan Company) 
Burlington, MA  USA (AverCom was formerly the Commercial Division of AverStar:
http://www.averstar.com/services/ebusiness_applications.html)



^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: XML/HTML DOM in Ada
  2001-03-12 18:05     ` Stephen Leake
  2001-03-12 23:19       ` Erik Sigra
  2001-03-13 18:38       ` Tucker Taft
@ 2001-03-13 19:09       ` Randy Brukardt
  2 siblings, 0 replies; 7+ messages in thread
From: Randy Brukardt @ 2001-03-13 19:09 UTC (permalink / raw)


Stephen Leake wrote in message ...
>There is an Ada Issue on this, at
>http://www.adaic.org/standards/95com/ada-issues/ somewhere, but I
>can't remember the number right now, and I can't find it in
>ai-summary.txt. Maybe you have time to do a better search.

That's the wrong URL. The AIs on AdaIC.org are not maintained, and are
very stale. (The ARA is starting a housecleaning on AdaIC.org, so
perhaps this will change.)

The current set of AIs is found at:

    www.ada-auth.org/ais.html

New feature: The summary is now available in HTML with links to the
actual AIs, so you don't even have to wade through a text file.

            Randy Brukardt
            ARG Editor.







^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2001-03-13 19:09 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-03-04  1:20 XML/HTML DOM in Ada Peter Hend�n
2001-03-07 20:28 ` Stephen Leake
2001-03-10 15:24   ` Peter Hend�n
2001-03-12 18:05     ` Stephen Leake
2001-03-12 23:19       ` Erik Sigra
2001-03-13 18:38       ` Tucker Taft
2001-03-13 19:09       ` Randy Brukardt

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox