org.apache.cocoon.xml.xlink
Class ExtendedXLinkPipe

java.lang.Object
  extended byorg.apache.cocoon.util.AbstractLogEnabled
      extended byorg.apache.cocoon.xml.AbstractXMLProducer
          extended byorg.apache.cocoon.xml.AbstractXMLPipe
              extended byorg.apache.cocoon.xml.xlink.XLinkPipe
                  extended byorg.apache.cocoon.xml.xlink.ExtendedXLinkPipe
All Implemented Interfaces:
ContentHandler, LexicalHandler, Poolable, Recyclable, org.apache.cocoon.xml.xlink.XLinkHandler, XMLConsumer, org.apache.cocoon.xml.XMLConsumer, org.apache.cocoon.xml.XMLPipe, org.apache.cocoon.xml.XMLProducer

public abstract class ExtendedXLinkPipe
extends XLinkPipe

This class extends the XLink semantic capabilities to understand those elements that are have default linking semantics associated.

This class reacts on 'href' and 'src' attributes and is able to understand the semantics of XHTML/WML/SMIL/SVG and all the rest of the languages that use either XLink of the above attributes.

NOTE: this class is clearly a hack and is not future compatible, but since many XML formats to date are not compatible with the XLink semantics this is what we have to do to live in the bleeding edge. Once there will be a way to remove this, that will be a happy day for XML and for Cocoon too.

Version:
$Id: ExtendedXLinkPipe.html 1304280 2012-03-23 11:18:01Z ilgrosso $

Field Summary
 
Fields inherited from class org.apache.cocoon.xml.xlink.XLinkPipe
XLINK_ACTUATE, XLINK_ARCROLE, XLINK_FROM, XLINK_HREF, XLINK_LABEL, XLINK_NAMESPACE_URI, XLINK_ROLE, XLINK_SHOW, XLINK_TITLE, XLINK_TO, XLINK_TYPE, XLINK_TYPE_ARC, XLINK_TYPE_EXTENDED, XLINK_TYPE_LOCATOR, XLINK_TYPE_RESOURCE, XLINK_TYPE_SIMPLE, XLINK_TYPE_TITLE
 
Fields inherited from class org.apache.cocoon.xml.AbstractXMLProducer
contentHandler, EMPTY_CONTENT_HANDLER, lexicalHandler, xmlConsumer
 
Constructor Summary
ExtendedXLinkPipe()
           
 
Method Summary
protected static Set arrayToSet(Object[] array)
           
 void simpleLink(String href, String role, String arcrole, String title, String show, String actuate, String uri, String name, String raw, Attributes attr)
           
 void startElement(String uri, String name, String raw, Attributes attr)
          Receive notification of the beginning of an element.
 
Methods inherited from class org.apache.cocoon.xml.xlink.XLinkPipe
endArc, endElement, endExtendedLink, endLocator, linkResource, linkTitle, startArc, startExtendedLink, startLocator
 
Methods inherited from class org.apache.cocoon.xml.AbstractXMLPipe
characters, comment, endCDATA, endDocument, endDTD, endEntity, endPrefixMapping, ignorableWhitespace, processingInstruction, setDocumentLocator, skippedEntity, startCDATA, startDocument, startDTD, startEntity, startPrefixMapping
 
Methods inherited from class org.apache.cocoon.xml.AbstractXMLProducer
recycle, setConsumer, setContentHandler, setLexicalHandler
 
Methods inherited from class org.apache.cocoon.util.AbstractLogEnabled
getLogger, setLogger
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.apache.cocoon.xml.XMLProducer
setConsumer
 

Constructor Detail

ExtendedXLinkPipe

public ExtendedXLinkPipe()
Method Detail

arrayToSet

protected static Set arrayToSet(Object[] array)

startElement

public void startElement(String uri,
                         String name,
                         String raw,
                         Attributes attr)
                  throws SAXException
Description copied from class: AbstractXMLPipe
Receive notification of the beginning of an element.

Specified by:
startElement in interface ContentHandler
Overrides:
startElement in class XLinkPipe
Throws:
SAXException

simpleLink

public void simpleLink(String href,
                       String role,
                       String arcrole,
                       String title,
                       String show,
                       String actuate,
                       String uri,
                       String name,
                       String raw,
                       Attributes attr)
                throws SAXException
Specified by:
simpleLink in interface org.apache.cocoon.xml.xlink.XLinkHandler
Overrides:
simpleLink in class XLinkPipe
Throws:
SAXException


Copyright © 1999-2008 The Apache Software Foundation. All Rights Reserved.