From: <ha...@us...> - 2006-09-12 12:44:01
|
Revision: 5502 http://svn.sourceforge.net/jmol/?rev=5502&view=rev Author: hansonr Date: 2006-09-12 05:43:56 -0700 (Tue, 12 Sep 2006) Log Message: ----------- 10.9.57 slightly improved scalar dictRef handling in XmlCml. Modified Paths: -------------- branches/v10_9/Jmol/src/org/jmol/adapter/smarter/XmlCmlReader.java Modified: branches/v10_9/Jmol/src/org/jmol/adapter/smarter/XmlCmlReader.java =================================================================== --- branches/v10_9/Jmol/src/org/jmol/adapter/smarter/XmlCmlReader.java 2006-09-12 05:46:22 UTC (rev 5501) +++ branches/v10_9/Jmol/src/org/jmol/adapter/smarter/XmlCmlReader.java 2006-09-12 12:43:56 UTC (rev 5502) @@ -134,6 +134,8 @@ } String scalarDictRef; + String scalarDictKey; + String scalarDictValue; String scalarTitle; void processStartElement(String namespaceURI, String localName, String qName, @@ -286,6 +288,9 @@ setKeepChars(true); scalarTitle = (String) atts.get("title"); scalarDictRef = (String) atts.get("dictRef"); + int iColon = scalarDictRef.indexOf(":"); + scalarDictValue = scalarDictRef.substring(iColon + 1); + scalarDictKey = scalarDictRef.substring(0, (iColon >= 0 ? iColon : 0)); return; } } @@ -396,7 +401,7 @@ if (scalarDictRef != null) { int i = 6; while (--i >= 0 - && !scalarDictRef.equals("cif:" + CifReader.cellParamNames[i])) { + && !scalarDictValue.equals(CifReader.cellParamNames[i])) { } if (i >= 0) parent.setUnitCellItem(i, parseFloat(chars)); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |