Community
Participate
Working Groups
The SML-IF spec indicates that documents can be matched using a prefix of the alias. For instance, with the following rule binding: <ruleBinding> <documentAlias>Student</documentAlias> <ruleAlias>Rule</ruleAlias> </ruleBinding> all rules that have an alias beginning with "Rule" (e.g. "Rule1", "RuleFoo", etc.) will be bound to all documents with an alias beginning with "Student" (e.g. "Student2", "StudentBar", etc.). Currently, the validator only does an exact match on the alias name. The validator uses a Map object to bind the aliases. Unfortunately, you can't look up Map values usign wildcards as keys. So, the internal structure will need to change so the alias lookup is treated as a wildcard match.
David, the actual match is not done at the string level, but URI prefix level. In the sample below, if the document alias is Student, then the rule can be applied to a\Student, a\b\c\Student, but NOT a\StudentConf We've discussed this off line and although I agreed that your sample is valid, I missed the fact that you are trying to append ( and actually prepend in this case ) strings and not URI prefixs to do the match See section 2.3 in the SMLIF spec
David, The sample I used in comment #1 is wrong; I meant to exemplify by defining the URI with ‘Student’ as a prefix and not suffix; sorry for the confusion.. So read comment#1 as below : David, the actual match is not done at the string level, but URI prefix level. In your sample, if the document alias is Student, then the rule can be applied to Student/a, Student/a/b/c, but NOT Studenta or Studentab/c What I am trying to say is that the prefix presented in the document or rule alias is an URI PREFIX and not a simple string. We've discussed this off line and although I agreed that your sample is valid, I missed the fact that you are trying to append strings and not URI fragments to do the match See section 2.3 in the SMLIF spec
Ok, here's a better example that I can get to fail. <ruleBindings> <ruleBinding> <documentAlias>Student</documentAlias> <ruleAlias>StudentIDRule</ruleAlias> </ruleBinding> </ruleBindings> where there are three documents that should match that alias prefix: <alias>Student/Person1</alias> <alias>Student/Person2</alias> <alias>Student/Person3</alias> Person3 should fail the schematron rule. Only if I change the bindings as follows do I see a failure message: <documentAlias>Student</documentAlias> That looks like a bug, correct?
Re comment #3 : correct, this is a bug
moving target to i8
Ruth, I am moving this to you so that you can reassign as you find appropriate
since this should be done in i12, moving to p1
Taking over defect
Fix checked into CVS - HEAD. Test case: Rules/InValidRuleBindingWithPrefix.xml
closing to cleanup bugzilla