Re: DTD

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, 02 May 2018 22:14:35 -0400, jerrycasiano@xxxxxxxxx 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
Fontconfig@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/fontconfig




[Index of Archives]     [Fedora Fonts]     [Fedora Users]     [Fedora Cloud]     [Kernel]     [Fedora Packaging]     [Fedora Desktop]     [PAM]     [Gimp Graphics Editor]     [Yosemite News]

  Powered by Linux