Skip to content

Commit

Permalink
Simplify DTDAttributeDefinitionParser class>>#attributeDefaultValidat…
Browse files Browse the repository at this point in the history
…orClassForPragma:

Fix #24
  • Loading branch information
astares committed Oct 25, 2023
1 parent bb95aea commit 83c6006
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/XML-Parser/DTDAttributeDefinitionParser.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,10 @@ Class {
DTDAttributeDefinitionParser class >> attributeDefaultValidatorClassForPragma: aDefaultPragma [
"the default pragma should have been checked for well-formedness by the
tokenizer so it's either empty, 'FIXED', 'REQUIRED', or 'IMPLIED'"
aDefaultPragma size > 0
ifTrue: [
(aDefaultPragma at: 1) == $F
aDefaultPragma ifNotEmpty: [
aDefaultPragma first == $F
ifTrue: [^ XMLAttributeFixedValueDefaultValidator].
(aDefaultPragma at: 1) == $I
aDefaultPragma first == $I
ifTrue: [^ XMLAttributeImpliedDefaultValidator].
^ XMLAttributeRequiredDefaultValidator].
^ XMLAttributeValueDefaultValidator
Expand Down

0 comments on commit 83c6006

Please sign in to comment.