org.apache.cocoon.xml.xlink
Class ExtendedXLinkPipe

java.lang.Object
  extended by org.apache.avalon.framework.logger.AbstractLogEnabled
      extended by org.apache.cocoon.xml.AbstractXMLProducer
          extended by org.apache.cocoon.xml.AbstractXMLPipe
              extended by org.apache.cocoon.xml.xlink.XLinkPipe
                  extended by org.apache.cocoon.xml.xlink.ExtendedXLinkPipe
All Implemented Interfaces:
Poolable, Recyclable, LogEnabled, XLinkHandler, XMLPipe, XMLProducer, XMLConsumer, ContentHandler, LexicalHandler
Direct Known Subclasses:
LinkGatherer, LinkSerializer, LinkTranslator

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:
CVS $Id: ExtendedXLinkPipe.java 433543 2006-08-22 06:22:54Z crossley $
Author:
Stefano Mazzocchi, Torsten Knodt

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.avalon.framework.logger.AbstractLogEnabled
enableLogging, getLogger, setupLogger, setupLogger, setupLogger
 
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
Parameters:
uri - The Namespace URI, or the empty string if the element has no Namespace URI or if Namespace processing is not being performed.
name - The local name (without prefix), or the empty string if Namespace processing is not being performed.
raw - The raw XML 1.0 name (with prefix), or the empty string if raw names are not available.
attr - The attributes attached to the element. If there are no attributes, it shall be an empty Attributes object.
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 XLinkHandler
Overrides:
simpleLink in class XLinkPipe
Throws:
SAXException


Copyright ? 1999-2007 The Apache Software Foundation. All Rights Reserved.