A logic for SVG documents query and retrieval