[ 
https://issues.apache.org/jira/browse/LABS-373?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12729501#action_12729501
 ] 

Simone Gianni commented on LABS-373:
------------------------------------

It turned out that a quite simple addition (inclusion of the outsider in the 
key) is enough to support simple XML element matching like <url>. This is far 
from a complete XML match (what about namespaces? and the context the XML is 
found in?) but is sufficient for 80% of cases where URL rewriting is needed in 
a simple XML file. 

Also, there is already in the codebase a CSSURLRewritingStream that rewrites 
urls inside CSS files when they are embedded in the page by the optimizer. This 
CSS rewriter displays the flexibility of the current implementation to be 
applied to non markup documents.

A small step further could be obtained by supporting some sort of wildcards in 
the keys. Right now keys are matched verbatim against the underlying stream 
flow, but this makes it impossible for example to support the content of an XML 
element no matters what attributes are present on it, which would be quite 
important. 

The simpler wildcard (*) could be implemented with minimal code rewrite, as 
long as it happens once in the key. Using a full-featured regexp matching 
system would kill performances, and reimplementing complex regexp semantics is 
out of the scope.



> [web] Make URL rewriting more extensible, to support rewriting URLs in XML 
> (like RSS feeds) and not only HTML
> -------------------------------------------------------------------------------------------------------------
>
>                 Key: LABS-373
>                 URL: https://issues.apache.org/jira/browse/LABS-373
>             Project: Labs
>          Issue Type: New Feature
>          Components: Magma
>    Affects Versions: Current
>            Reporter: Simone Gianni
>             Fix For: Current
>
>


-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: labs-unsubscr...@labs.apache.org
For additional commands, e-mail: labs-h...@labs.apache.org

Reply via email to