| Method from org.apache.cocoon.sunshine.helpers.URLRewriter Detail: |
public void characters(char[] ary,
int start,
int length) throws SAXException {
contentHandler.characters(ary,start,length);
}
|
public void comment(char[] ary,
int start,
int length) throws SAXException {
if (this.lexicalHandler != null) {
lexicalHandler.comment(ary,start,length);
}
}
|
public void endCDATA() throws SAXException {
if (lexicalHandler != null) lexicalHandler.endCDATA();
}
|
public void endDTD() throws SAXException {
if (lexicalHandler != null) lexicalHandler.endDTD();
}
|
public void endDocument() throws SAXException {
contentHandler.endDocument();
}
|
public void endElement(String namespace,
String name,
String raw) throws SAXException {
contentHandler.endElement(namespace,name,raw);
}
|
public void endEntity(String name) throws SAXException {
if (lexicalHandler != null) lexicalHandler.endEntity(name);
}
|
public void endPrefixMapping(String prefix) throws SAXException {
contentHandler.endPrefixMapping(prefix);
}
|
public void ignorableWhitespace(char[] ary,
int start,
int length) throws SAXException {
contentHandler.ignorableWhitespace(ary,start,length);
}
|
public void processingInstruction(String target,
String data) throws SAXException {
contentHandler.processingInstruction(target,data);
}
|
public void setDocumentLocator(Locator locator) {
contentHandler.setDocumentLocator(locator);
}
|
public void skippedEntity(String name) throws SAXException {
contentHandler.skippedEntity(name);
}
|
public void startCDATA() throws SAXException {
if (lexicalHandler != null) lexicalHandler.startCDATA();
}
|
public void startDTD(String name,
String public_id,
String system_id) throws SAXException {
if (lexicalHandler != null) lexicalHandler.startDTD(name,public_id,system_id);
}
|
public void startDocument() throws SAXException {
contentHandler.startDocument();
}
|
public void startElement(String namespace,
String name,
String raw,
Attributes attr) throws SAXException {
if (this.mode == 1) {
String url;
String attrname;
AttributesImpl newattr = null;
String value;
for(int i = 0; i < attr.getLength(); i++) {
attrname = attr.getLocalName(i);
if (attrname.equals("href") == true
|| attrname.equals("action") == true) {
if (newattr == null) {
newattr = new AttributesImpl(attr);
}
value = attr.getValue(i);
if (value.indexOf(':") == -1) {
try {
URL baseURL = new URL(new URL(this.baseUrl), value);
value = baseURL.toExternalForm();
} catch (MalformedURLException local) {
value = attr.getValue(i);
}
}
newattr.setValue(i, this.sunShineUrl + value);
} else if (attrname.equals("src") == true
|| attrname.equals("background") == true) {
if (newattr == null) {
newattr = new AttributesImpl(attr);
}
value = attr.getValue(i);
if (value.indexOf(':") == -1) {
try {
URL baseURL = new URL(new URL(this.baseUrl), value);
value = baseURL.toExternalForm();
} catch (MalformedURLException local) {
value = attr.getValue(i);
}
}
newattr.setValue(i, value);
}
}
if (newattr != null) {
contentHandler.startElement(namespace, name, raw, newattr);
return;
}
}
contentHandler.startElement(namespace,name,raw,attr);
}
|
public void startEntity(String name) throws SAXException {
if (lexicalHandler != null) lexicalHandler.startEntity(name);
}
|
public void startPrefixMapping(String prefix,
String uri) throws SAXException {
contentHandler.startPrefixMapping(prefix,uri);
}
|