This module contains basic methods for accessing and defining element and mark attributes.
Find the first BoolAttribute that has the name provided and return Just that value. If no attribute exists, return Nothing.
findBoolAttribute "foo" [ BoolAttribute "foo" True, StringAttribute "foo2" "bar2" ]
--> Just TrueFind the first FloatAttribute that has the name provided and return Just that value. If no attribute exists, return Nothing.
findFloatAttribute "foo" [ FloatAttribute "foo" 1.1, StringAttribute "foo2" "bar2" ]
--> Just 1.1Find the first IntegerAttribute that has the name provided and return Just that value. If no attribute exists, return Nothing.
findIntegerAttribute "foo" [ IntegerAttribute "foo" 1, StringAttribute "foo2" "bar2" ]
--> Just 1Find the first StringAttribute that has the name provided and return Just that value. If no attribute exists, return Nothing.
findStringAttribute "foo2" [ FloatAttribute "foo" 1.1, StringAttribute "foo2" "bar2" ]
--> Just "bar2"Replaces all BoolAttributes that have the name provided in the list, or add it to the beginning of the list if no pre existing BoolAttribute exists.
replaceOrAddBoolAttribute "foo" True [ BoolAttribute "foo" False, StringAttribute "foo2" "bar2" ]
--> [ BoolAttribute "foo" True, StringAttribute "foo2" "bar2" ]Replaces all FloatAttributes that have the name provided in the list, or add it to the beginning of the list if no pre existing FloatAttribute exists.
replaceOrAddFloatAttribute "foo" 2.2 [ FloatAttribute "foo" 1.1, StringAttribute "foo2" "bar2" ]
--> [ FloatAttribute "foo" 2.2, StringAttribute "foo2" "bar2" ]Replaces all IntegerAttributes that have the name provided in the list, or add it to the beginning of the list if no pre existing IntegerAttribute exists.
replaceOrAddIntegerAttribute "foo" 2 [ IntegerAttribute "foo" 1, StringAttribute "foo2" "bar2" ]
--> [ IntegerAttribute "foo" 2, StringAttribute "foo2" "bar2" ]Replaces all StringAttributes that have the name provided in the list, or add it to the beginning of the list if no pre existing StringAttribute exists.
replaceOrAddStringAttribute "foo2" "bar3" [ BoolAttribute "foo" False, StringAttribute "foo2" "bar2" ]
--> [ BoolAttribute "foo" False, StringAttribute "foo2" "bar3" ]
An attribute is a key value pair. It's used to store information on an element or mark. Information you can store are things like color, font type, or image or link locations.