mausch / XmlLiteralsTypeProvider

F# type provider implementing compile-time XML literals
Apache License 2.0
5 stars 2 forks source link

Optional holes #12

Open mausch opened 10 years ago

mausch commented 10 years ago
<x:text name="message">Hello</x:text>

would generate a template with hole 'message' of type string option. If the argument is None, it uses the inner value "Hello" as a default value.

mausch commented 10 years ago

If I had <x:elem name="qq"><a href="/home">Home</a></x:elem>, this hole would be interpreted as an XElement option with the link as the default value. It doesn't make sense to have a mandatory hole with children.

panesofglass commented 10 years ago

This is a brilliant idea!