You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fop-commits@xmlgraphics.apache.org by pb...@apache.org on 2004/05/30 08:34:41 UTC

cvs commit: xml-fop/src/java/org/apache/fop/datatypes NCName.java

pbwest      2004/05/29 23:34:41

  Modified:    src/java/org/apache/fop/datatypes Tag: FOP_0-20-0_Alt-Design
                        NCName.java
  Log:
  Added getNCName(PropertyValue)
  
  Revision  Changes    Path
  No                   revision
  No                   revision
  1.1.2.3   +18 -3     xml-fop/src/java/org/apache/fop/datatypes/Attic/NCName.java
  
  Index: NCName.java
  ===================================================================
  RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/datatypes/Attic/NCName.java,v
  retrieving revision 1.1.2.2
  retrieving revision 1.1.2.3
  diff -u -r1.1.2.2 -r1.1.2.3
  --- NCName.java	19 Feb 2004 03:11:55 -0000	1.1.2.2
  +++ NCName.java	30 May 2004 06:34:41 -0000	1.1.2.3
  @@ -104,6 +104,21 @@
       }
   
       /**
  +     * Return the NCName value from a PropertyValue. 
  +     * @param pv
  +     * @return the NCName string value
  +     * @exception PropertyException if the <code>PropertyValue</code> is not
  +     * an <code>NCName</code>
  +     */
  +    public static String getNCName(PropertyValue pv)
  +    throws PropertyException {
  +        if (pv.getType() == PropertyValue.NCNAME) {
  +            return ((NCName)pv).getNCName();
  +        }
  +        throw new PropertyException("PropertyValue not an NCNAME type");
  +    }
  +
  +    /**
        * validate the <i>NCName</i> against the associated property.
        */
       public void validate() throws PropertyException {
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: fop-cvs-unsubscribe@xml.apache.org
For additional commands, e-mail: fop-cvs-help@xml.apache.org