Top Description Fields Constructors Methods
uk.ac.ed.ph.snuggletex.dombuilding

public final Class XMLNameOrIdHandler

extends Object
implements CommandHandler
Class Inheritance
All Implemented Interfaces
uk.ac.ed.ph.snuggletex.dombuilding.CommandHandler
Imports
uk.ac.ed.ph.snuggletex.internal.DOMBuilder, .SnuggleParseException, uk.ac.ed.ph.snuggletex.tokens.ArgumentContainerToken, .CommandToken, org.w3c.dom.Element

Trivial handler for the \\xmlName and \\xmlId commands. All this does is check that the argument is a proper XML Name or ID and then outputs it as normal.
Author
David McKain
Version
$Revision$

Field Summary

Modifier and TypeField and Description
private final int
checkType

Set to check for an ID, leave false to just test for an XML Name.

public static final int
public static final int

Constructor Summary

AccessConstructor and Description
public
XMLNameOrIdHandler(final int checkType)

Method Summary

Modifier and TypeMethod and Description
public void
handleCommand(DOMBuilder builder, Element parentElement, CommandToken token)

Implements uk.ac.ed.ph.snuggletex.dombuilding.CommandHandler.handleCommand.

Called when a CommandToken is being handled by the DOMBuilder.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

checkTypeback to summary
private final int checkType

Set to check for an ID, leave false to just test for an XML Name.

IDback to summary
public static final int ID
NAMEback to summary
public static final int NAME

Constructor Detail

XMLNameOrIdHandlerback to summary
public XMLNameOrIdHandler(final int checkType)

Method Detail

handleCommandback to summary
public void handleCommand(DOMBuilder builder, Element parentElement, CommandToken token) throws SnuggleParseException

Implements uk.ac.ed.ph.snuggletex.dombuilding.CommandHandler.handleCommand.

Doc from uk.ac.ed.ph.snuggletex.dombuilding.CommandHandler.handleCommand.

Called when a CommandToken is being handled by the DOMBuilder.

Exceptions
SnuggleParseException:
to indicate a client error