14c7a0d97cf2b27790e6236965a1d798d710d7ec7Jesse Wilson/*
24c7a0d97cf2b27790e6236965a1d798d710d7ec7Jesse Wilson * Licensed to the Apache Software Foundation (ASF) under one
34c7a0d97cf2b27790e6236965a1d798d710d7ec7Jesse Wilson * or more contributor license agreements. See the NOTICE file
44c7a0d97cf2b27790e6236965a1d798d710d7ec7Jesse Wilson * distributed with this work for additional information
54c7a0d97cf2b27790e6236965a1d798d710d7ec7Jesse Wilson * regarding copyright ownership. The ASF licenses this file
64c7a0d97cf2b27790e6236965a1d798d710d7ec7Jesse Wilson * to you under the Apache License, Version 2.0 (the  "License");
74c7a0d97cf2b27790e6236965a1d798d710d7ec7Jesse Wilson * you may not use this file except in compliance with the License.
84c7a0d97cf2b27790e6236965a1d798d710d7ec7Jesse Wilson * You may obtain a copy of the License at
94c7a0d97cf2b27790e6236965a1d798d710d7ec7Jesse Wilson *
104c7a0d97cf2b27790e6236965a1d798d710d7ec7Jesse Wilson *     http://www.apache.org/licenses/LICENSE-2.0
114c7a0d97cf2b27790e6236965a1d798d710d7ec7Jesse Wilson *
124c7a0d97cf2b27790e6236965a1d798d710d7ec7Jesse Wilson * Unless required by applicable law or agreed to in writing, software
134c7a0d97cf2b27790e6236965a1d798d710d7ec7Jesse Wilson * distributed under the License is distributed on an "AS IS" BASIS,
144c7a0d97cf2b27790e6236965a1d798d710d7ec7Jesse Wilson * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
154c7a0d97cf2b27790e6236965a1d798d710d7ec7Jesse Wilson * See the License for the specific language governing permissions and
164c7a0d97cf2b27790e6236965a1d798d710d7ec7Jesse Wilson * limitations under the License.
174c7a0d97cf2b27790e6236965a1d798d710d7ec7Jesse Wilson */
184c7a0d97cf2b27790e6236965a1d798d710d7ec7Jesse Wilson/*
194c7a0d97cf2b27790e6236965a1d798d710d7ec7Jesse Wilson * $Id: ElemOtherwise.java 468643 2006-10-28 06:56:03Z minchau $
204c7a0d97cf2b27790e6236965a1d798d710d7ec7Jesse Wilson */
214c7a0d97cf2b27790e6236965a1d798d710d7ec7Jesse Wilsonpackage org.apache.xalan.templates;
224c7a0d97cf2b27790e6236965a1d798d710d7ec7Jesse Wilson
234c7a0d97cf2b27790e6236965a1d798d710d7ec7Jesse Wilson
244c7a0d97cf2b27790e6236965a1d798d710d7ec7Jesse Wilson/**
254c7a0d97cf2b27790e6236965a1d798d710d7ec7Jesse Wilson * Implement xsl:otherwise.
264c7a0d97cf2b27790e6236965a1d798d710d7ec7Jesse Wilson * <pre>
274c7a0d97cf2b27790e6236965a1d798d710d7ec7Jesse Wilson * <!ELEMENT xsl:otherwise %template;>
284c7a0d97cf2b27790e6236965a1d798d710d7ec7Jesse Wilson * <!ATTLIST xsl:otherwise %space-att;>
294c7a0d97cf2b27790e6236965a1d798d710d7ec7Jesse Wilson * </pre>
304c7a0d97cf2b27790e6236965a1d798d710d7ec7Jesse Wilson * @see <a href="http://www.w3.org/TR/xslt#section-Conditional-Processing-with-xsl:choose">XXX in XSLT Specification</a>
314c7a0d97cf2b27790e6236965a1d798d710d7ec7Jesse Wilson * @xsl.usage advanced
324c7a0d97cf2b27790e6236965a1d798d710d7ec7Jesse Wilson */
334c7a0d97cf2b27790e6236965a1d798d710d7ec7Jesse Wilsonpublic class ElemOtherwise extends ElemTemplateElement
344c7a0d97cf2b27790e6236965a1d798d710d7ec7Jesse Wilson{
354c7a0d97cf2b27790e6236965a1d798d710d7ec7Jesse Wilson    static final long serialVersionUID = 1863944560970181395L;
364c7a0d97cf2b27790e6236965a1d798d710d7ec7Jesse Wilson
374c7a0d97cf2b27790e6236965a1d798d710d7ec7Jesse Wilson  /**
384c7a0d97cf2b27790e6236965a1d798d710d7ec7Jesse Wilson   * Get an int constant identifying the type of element.
394c7a0d97cf2b27790e6236965a1d798d710d7ec7Jesse Wilson   * @see org.apache.xalan.templates.Constants
404c7a0d97cf2b27790e6236965a1d798d710d7ec7Jesse Wilson   *
414c7a0d97cf2b27790e6236965a1d798d710d7ec7Jesse Wilson   * @return The token ID for this element
424c7a0d97cf2b27790e6236965a1d798d710d7ec7Jesse Wilson   */
434c7a0d97cf2b27790e6236965a1d798d710d7ec7Jesse Wilson  public int getXSLToken()
444c7a0d97cf2b27790e6236965a1d798d710d7ec7Jesse Wilson  {
454c7a0d97cf2b27790e6236965a1d798d710d7ec7Jesse Wilson    return Constants.ELEMNAME_OTHERWISE;
464c7a0d97cf2b27790e6236965a1d798d710d7ec7Jesse Wilson  }
474c7a0d97cf2b27790e6236965a1d798d710d7ec7Jesse Wilson
484c7a0d97cf2b27790e6236965a1d798d710d7ec7Jesse Wilson  /**
494c7a0d97cf2b27790e6236965a1d798d710d7ec7Jesse Wilson   * Return the node name.
504c7a0d97cf2b27790e6236965a1d798d710d7ec7Jesse Wilson   *
514c7a0d97cf2b27790e6236965a1d798d710d7ec7Jesse Wilson   * @return The element's name
524c7a0d97cf2b27790e6236965a1d798d710d7ec7Jesse Wilson   */
534c7a0d97cf2b27790e6236965a1d798d710d7ec7Jesse Wilson  public String getNodeName()
544c7a0d97cf2b27790e6236965a1d798d710d7ec7Jesse Wilson  {
554c7a0d97cf2b27790e6236965a1d798d710d7ec7Jesse Wilson    return Constants.ELEMNAME_OTHERWISE_STRING;
564c7a0d97cf2b27790e6236965a1d798d710d7ec7Jesse Wilson  }
574c7a0d97cf2b27790e6236965a1d798d710d7ec7Jesse Wilson}
58