At the moment I often end up typing very verbose XSP pages to get attributes in elements containing expressions. Here's an example from some recent code:

    if (my $n = $page->previous_page) {
        <pagenav previous="1">
            <xsp:attribute
                name="page"><xsp:expr>$n</xsp:expr></xsp:attribute>
            &lt;&lt;
        </pagenav>
    }

I think we should take a leaf out of XSLT's book and allow interpolation in attributes, so that this would work:

    if (my $n = $page->previous_page) {
        <pagenav previous="1" page="{$n}">&lt;&lt;</pagenav>
    }

Should be fairly simple to do. Thoughts?

Matt.



Reply via email to