XML-NS: chloe-name http://factorcode.org/chloe/1.0
: required-attr ( tag name -- value )
- tuck chloe-name attr
- [ nip ] [ " attribute is required" append throw ] if* ;
+ [ nip ] [ chloe-name attr ] 2bi
+ [ ] [ " attribute is required" append throw ] ?if ;
: optional-attr ( tag name -- value )
chloe-name attr ;