/[classpath]/cp-tools/src/gnu/ldml/Parser.java
ViewVC logotype

Diff of /cp-tools/src/gnu/ldml/Parser.java

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.6 by cbj, Sun Jan 30 02:33:09 2005 UTC revision 1.7 by smarothy, Sun Mar 6 21:58:58 2005 UTC
# Line 1  Line 1 
1  /*  /*
2   * gnu.ldml.Parser Copyright (C) 2004 Free Software Foundation,   * gnu.ldml.Parser Copyright (C) 2005
3   * Inc.   * Free Software Foundation, Inc.
4   *   *
5   * This file is part of GNU Classpath.   * This file is part of GNU Classpath.
6   *   *
# Line 226  public class Parser extends DefaultHandl Line 226  public class Parser extends DefaultHandl
226    }    }
227    
228    /*    /*
229       * Node with a single attribute.
230       */
231      class SinglyAttributedNode extends EmptyParserElement
232      {
233        Element elt;
234        String attrName;
235    
236        public SinglyAttributedNode(String attrName)
237        {
238          this.attrName = attrName;
239        }  
240    
241        public void start(String qName, Attributes atts) throws SAXException
242        {
243          super.start(qName, atts);
244          String attr = atts.getValue(attrName);
245          parentElement = elt = new Element(Parser.this, parentElement, qName);
246          elt.defaultType = attr;
247        }
248    
249        public void end(String qName)
250        {
251          parentElement = elt.superElement;
252        }
253      }
254    
255      /*
256     * This is a group which contains a list of element indexed by their type.     * This is a group which contains a list of element indexed by their type.
257     */     */
258    class GroupList extends EmptyParserElement    class GroupList extends EmptyParserElement
# Line 550  public class Parser extends DefaultHandl Line 577  public class Parser extends DefaultHandl
577      allElements.put("perMille", new Data());      allElements.put("perMille", new Data());
578      allElements.put("infinity", new Data());      allElements.put("infinity", new Data());
579      allElements.put("nan", new Data());      allElements.put("nan", new Data());
580        allElements.put("week", new Group());
581        allElements.put("minDays", new SinglyAttributedNode("count"));
582        allElements.put("firstDay", new SinglyAttributedNode("day"));
583      allElements.put("am", new Data());      allElements.put("am", new Data());
584      allElements.put("pm", new Data());      allElements.put("pm", new Data());
585      allElements.put("localizedPatternChars", new Data());      allElements.put("localizedPatternChars", new Data());

Legend:
Removed from v.1.6  
changed lines
  Added in v.1.7

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26