Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > XML > preprocessor for DTDs?

Reply
Thread Tools

preprocessor for DTDs?

 
 
nobody
Guest
Posts: n/a
 
      10-13-2003
hello!

do you know of any (free) preprocessor able to deal with
DTDs?

I'dlike to do things as
#define with_b
...
<!ELEMENT a (#PCDATA)>
<!ELEMENT c (#PCDATA)>
#ifdef with_b
<!ELEMENT b (#PCDATA)>
#endif
...
#ifdef with_b
<!ELEMENT x (a+,
#ifdef with_b
b*,
#endif
c)>
...
like with the good old C preproc.
I'm aware of the INCLUDE/IGNORE "feature" but I'm missing
dynamic evaluation of this statements.

thx for any hints, andreas (ala_NO@SPAM_context.ch)
 
Reply With Quote
 
 
 
 
Stefan Ram
Guest
Posts: n/a
 
      10-13-2003
nobody <(E-Mail Removed)> writes:
>do you know of any (free) preprocessor able to deal with
>DTDs?


Two good preprocessors:

http://math.polytechnique.fr/cmat/auroux/prog/gpp.html
http://www.ross.net/funnelweb/

>
>I'dlike to do things as
> #define with_b
> ...
> <!ELEMENT a (#PCDATA)>
> <!ELEMENT c (#PCDATA)>
> #ifdef with_b
> <!ELEMENT b (#PCDATA)>
> #endif
> ...
> #ifdef with_b
> <!ELEMENT x (a+,
> #ifdef with_b
> b*,
> #endif
> c)>


I would use any language, or even better: Perl, i.e.:

use strict;
use warnings;

sub with_b
{ return "
<!ELEMENT a (#PCDATA)>
<!ELEMENT c (#PCDATA)>
"; }

if( defined with_b )
{ print "
<!ELEMENT b (#PCDATA)>
"; }

This (perl) is even better than any pre-processor - you could
easily query a database or a remote web page, if you want to
make you DTD depending on its contents or arbitrarily complex
functions of both. There are even CPAN modules to help you
to parse DTDs, so you could also analyze another DTD with
that "preprocessor" and then generate your DTD depending on
this.




 
Reply With Quote
 
 
 
 
nobody
Guest
Posts: n/a
 
      10-14-2003
> do you know of any (free) preprocessor able to deal with DTDs?
found one that nicely fits the bill:
Double Helix DHpp - a standalone text preprocessor at
http://www.seventh-star-studios.com/software/dhpp
 
Reply With Quote
 
Alain Ketterlin
Guest
Posts: n/a
 
      10-15-2003
nobody <(E-Mail Removed)> writes:

> do you know of any (free) preprocessor able to deal with
> DTDs?
>
> I'dlike to do things as
> #define with_b
> ...
> <!ELEMENT a (#PCDATA)>
> <!ELEMENT c (#PCDATA)>
> #ifdef with_b
> <!ELEMENT b (#PCDATA)>
> #endif
> ...
> #ifdef with_b
> <!ELEMENT x (a+,
> #ifdef with_b
> b*,
> #endif
> c)>
> ...
> like with the good old C preproc.


Why not use... the good old preproc. It's called cpp on my system.

-- Alain.
 
Reply With Quote
 
nobody
Guest
Posts: n/a
 
      10-19-2003
Alain Ketterlin wrote:
>> do you know of any (free) preprocessor able to deal with DTDs?
>> like with the good old C preproc.

> Why not use... the good old preproc. It's called cpp on my system.

C preprocessors expect C syntax, at least those I tried out
couldn't preproc non C sources ;-(
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Compiler error occurred when try to use a flexible template expression in preprocessor definesCompiler error occurred when try to use a flexible template expression in preprocessor defines snnn C++ 6 03-14-2005 04:09 PM
C# Preprocessor =?Utf-8?B?SSBhbSBTYW0=?= ASP .Net 2 03-13-2005 02:47 PM
preprocessor, token concatenation, no valid preprocessor token Cronus C++ 1 07-14-2004 11:10 PM
VHDL Preprocessor The Weiss Family VHDL 2 07-14-2004 05:51 AM
Preprocessor conditional compilation variable not being saved Chris P ASP .Net 0 10-28-2003 08:48 PM



Advertisments