Bug 23757 - Add mode="delete" to <edit>
Summary: Add mode="delete" to <edit>
Alias: None
Product: fontconfig
Classification: Unclassified
Component: library (show other bugs)
Version: 2.4
Hardware: Other All
: medium enhancement
Assignee: Akira TAGOH
QA Contact: Behdad Esfahbod
Depends on:
Reported: 2009-09-06 19:02 UTC by Behdad Esfahbod
Modified: 2013-02-01 05:27 UTC (History)
2 users (show)

See Also:
i915 platform:
i915 features:


Description Behdad Esfahbod 2009-09-06 19:02:43 UTC
Currently one can't delete an element value.  Should add mode="delete" and mode="delete_all".
Comment 1 Akira TAGOH 2012-03-28 03:41:33 UTC
assuming that "delete" is to delete the specific value in the object from the pattern and "delete_all" to delete all of values in the object from the pattern so that the syntax of <edit> requires the object name? so if I want to delete "ja" from the lang object if any:

<edit name="lang" mode="delete">

and to delete everything:

<edit name="lang" mode="delete_all"/> ?
Comment 2 Akira TAGOH 2013-01-29 11:23:39 UTC
proposed changes:

commit d95aee42d952fe11f3cc173d1d94ae19f0053af2
Author: Akira TAGOH <akira@tagoh.org>
Date:   Tue Jan 29 20:19:36 2013 +0900

    Bug 23757 - Add mode="delete" to <edit>
    Add two edit mode, "delete" and "delete_all".
    what values are being deleted depends on <test> as documented.
    if the target object is same to what is tested, matching value there
    will be deleted. otherwise all of values in the object will be deleted.
    so this would means both edit mode will not take any expressions.
    Given that the testing is always true here, the following rules:
        <test name="foo" compare="eq">
        <edit name="foo" mode="delete"/>
    will removes "bar" string from "foo" object. and:
        <test name="foo" compare="eq">
        <edit name="bar" mode="delete"/>
    will removes all of values in "bar" object.
Comment 3 Akira TAGOH 2013-02-01 05:27:13 UTC
committed into master.

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.