Re: DTD

Lawrence D'Oliveiro <[email protected]>
Newsgroups gmane.comp.fonts.fontconfig
Organization Geek Central
Message-ID <[email protected]>
On Wed, 02 May 2018 22:14:35 -0400, [email protected] wrote:

> Since it doesn't really take any time or effort and it's pointed out
> silly mistakes in the past, I think I'll continue to do what I'm doing
> rather than wait for users to file bugs.

Following is a pretty trivial, not to say useless, example of a
Fontconfig file, designed purely to show the kinds of errors that no
DTD can pick up.

Pass:

    <!-- config parsing test -->
    <fontconfig>
        <int>3</int>
    </fontconfig>

Fail:

    <!-- config parsing test -->
    <fontconfig>
        <int>3.5</int>
    </fontconfig>

The error report:

     Fontconfig error: ..., line 3: "3.5": not a valid integer

Here’s the very simple validator script I used:

    #!/usr/bin/python3

    import sys
    import fontconfig

    conf = fontconfig.Config.create()
    conf.parse_and_load \
      (
        filename = sys.argv[1],
        complain = True
      )
    sys.stdout.write("parse completed OK?\n")

And not a DTD in sight.
_______________________________________________
Fontconfig mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/fontconfig
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.