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 |
* |
* |
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 |
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()); |