pipeline:convertAbsoluteToRelativeURL

Purpose

Removes base URL prefixes or translates URLs in content.

Attributes

Attribute Description Type Default Options Use
baseURL The remote server prefix to match. If used by itself, MCS strips off the prefix in all content instances. xs:anyURI none    optional 
substitutionPath Must be used with the baseURL attribute. The remote server prefix to replace the value in baseURL. xs:anyURI none    optional 

Examples

<?xml version="1.0" encoding="UTF-8"?>
<html xmlns="http://www.w3.org/2002/06/xhtml2"
  xmlns:urid="http://www.volantis.com/xmlns/marlin-uri-driver"
  xmlns:pipeline="http://www.volantis.com/xmlns/marlin-pipeline">
  <head>
    <title>pipeline:convertAbsoluteToRelativeURL</title>
  </head>
  <body>
    <div>
      <pipeline:convertAbsoluteToRelativeURL
        baseURL="http://www.mytestsite.com/"
        substitutionPath="http://localhost:8080/">
        <urid:fetch href="test.xdinc"/>
      </pipeline:convertAbsoluteToRelativeURL>
    </div>
  </body>
</html>

The test.xdinc file may look like this.

<?xml version="1.0" encoding="UTF-8"?>
<div xmlns="http://www.w3.org/2002/06/xhtml2">
  <a href="http://www.mytestsite.com/mcs/projects/client-app/index.xdime">Client Framework Demo</a>
</div>

Related topics