Github user ansell commented on a diff in the pull request:

    https://github.com/apache/any23/pull/17#discussion_r27446443
  
    --- Diff: 
core/src/main/java/org/apache/any23/validator/rule/MissingItemscopeAttributeValueRule.java
 ---
    @@ -0,0 +1,52 @@
    +/*
    + * Licensed to the Apache Software Foundation (ASF) under one or more
    + * contributor license agreements.  See the NOTICE file distributed with
    + * this work for additional information regarding copyright ownership.
    + * The ASF licenses this file to You under the Apache License, Version 2.0
    + * (the "License"); you may not use this file except in compliance with
    + * the License.  You may obtain a copy of the License at
    + *
    + *  http://www.apache.org/licenses/LICENSE-2.0
    + *
    + * Unless required by applicable law or agreed to in writing, software
    + * distributed under the License is distributed on an "AS IS" BASIS,
    + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    + * See the License for the specific language governing permissions and
    + * limitations under the License.
    + */
    +
    +package org.apache.any23.validator.rule;
    +
    +import org.apache.any23.validator.DOMDocument;
    +import org.apache.any23.validator.Fix;
    +import org.apache.any23.validator.Rule;
    +import org.apache.any23.validator.RuleContext;
    +
    +/**
    + * This fixes missing attribute values for the 'itemscope' attribute, 
    + * which was be associated with <div> nodes.
    + * Typically when such a snippet of XHTML is fed through the 
    + * {@link org.apache.any23.extractor.rdfa.RDFa11Extractor}, and
    + * subsequently to Sesame's {@link 
org.semarglproject.sesame.rdf.rdfa.SesameRDFaParser},
    + * it will result in the following behavior. 
    + * <pre>
    + * {@code
    + * [Fatal Error] :23:15: Attribute name "itemscope" associated with an 
element type "div" must be followed by the ' = ' character.
    + * }
    + * </pre>
    + * This Fix is an effort to mitigate against that happening. 
    + *
    + */
    +public class MissingItemscopeAttributeValueRule implements Fix {
    --- End diff --
    
    There is a hardcoded set in DefaultValidator.loadDefaultRules, but I can't 
find any place that is doing classpath scanning there.
    
    I also do not understand the relationship between Rule and Fix. In the 
DefaultValidator, there are either Rule, or Rule+Fix, not just a Fix like you 
have here.
    
    I will look into it further when I get a chance.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

Reply via email to