[Owasp-antisamy] What does ShorthandList mean in the config files?

Dan Rabe dan.rabe at oracle.com
Wed Dec 23 15:00:45 EST 2009


Could someone please give me a brief explanation of how shorthand-list 
works in the xml config files?

I see one usage that makes sense to me: background. You can use 
background as a shorthand for setting several other background- properties:

<property name="background" description="The 'background' property is a 
shorthand property for setting the individual background properties 
(i.e., 'background-color', 'background-image', 'background-repeat', 
'background-attachment' and 'background-position') at the same place in 
the style sheet.">
    <literal-list>
        <literal value="inherit"/>
    </literal-list>
    <shorthand-list>
        <shorthand name="background-color"/>
        <shorthand name="background-image"/>
        <shorthand name="background-repeat"/>
        <shorthand name="background-attachment"/>
        <shorthand name="background-position"/>                        
                       
    </shorthand-list>
</property>

However, there are some other usages that don't make sense. For example, 
margin can be used as a shorthand for setting margin-top, margin-right, 
margin-bottom, and margin-left. But what I see in antisamy.xml is this:
<property name="margin" description="">
    <category-list>
        <category value="visual"/>
    </category-list>
    <literal-list>
        <literal value="inherit"/>
        <literal value="auto"/>
    </literal-list>
    <regexp-list>
        <regexp name="positiveLength"/>
        <regexp name="positivePercentage"/>               
    </regexp-list>
</property>
<property name="margin-top" default="0" description="">
    <category-list>
        <category value="visual"/>
    </category-list>
    <literal-list>
        <literal value="inherit"/>
    </literal-list>
    <shorthand-list>
        <shorthand name="margin"/>
    </shorthand-list>
</property>

This seems backwards to me. Shouldn't margin contain a shorthand-list 
for margin-top, margin-right, margin-bottom, margin-left?

BTW, I'm looking at antisamy.xsd from the trunk, SVN revision 137.

Thanks,
--Dan

-------------- next part --------------
An HTML attachment was scrubbed...
URL: https://lists.owasp.org/pipermail/owasp-antisamy/attachments/20091223/f417e3c6/attachment.html 


More information about the Owasp-antisamy mailing list