should get us sstarted on HDF now! Horay...

git-svn-id: https://svn.apache.org/repos/asf/jakarta/poi/trunk@352239 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Andrew C. Oliver 2002-03-17 00:49:35 +00:00
parent d293142640
commit 863ac50358
2 changed files with 3 additions and 6 deletions

View File

@ -93,7 +93,6 @@ public class RecordGenerator
) )
) )
{ {
System.out.println(file.getAbsolutePath());
// Get record name and package // Get record name and package
DocumentBuilderFactory factory = DocumentBuilderFactory factory =
DocumentBuilderFactory.newInstance(); DocumentBuilderFactory.newInstance();
@ -101,10 +100,7 @@ public class RecordGenerator
Document document = builder.parse(file); Document document = builder.parse(file);
Element record = document.getDocumentElement(); Element record = document.getDocumentElement();
String extendstg = record.getElementsByTagName("extends").item(0).getFirstChild().getNodeValue(); String extendstg = record.getElementsByTagName("extends").item(0).getFirstChild().getNodeValue();
System.out.println("extends" + record.getElementsByTagName("extends").getLength());
System.out.println("extends" + record.getElementsByTagName("extends").item(0).toString());
String suffix = record.getElementsByTagName("suffix").item(0).getFirstChild().getNodeValue(); String suffix = record.getElementsByTagName("suffix").item(0).getFirstChild().getNodeValue();
System.out.println("suffix" + record.getElementsByTagName("suffix").getLength());
String recordName = record.getAttributes().getNamedItem("name").getNodeValue(); String recordName = record.getAttributes().getNamedItem("name").getNodeValue();
String packageName = record.getAttributes().getNamedItem("package").getNodeValue(); String packageName = record.getAttributes().getNamedItem("package").getNodeValue();
packageName = packageName.replace('.','/'); packageName = packageName.replace('.','/');
@ -117,8 +113,9 @@ public class RecordGenerator
String args[] = new String [] { "-in", file.getAbsolutePath(), "-xsl", recordStyleDir + "/" + extendstg.toLowerCase() + ".xsl", String args[] = new String [] { "-in", file.getAbsolutePath(), "-xsl", recordStyleDir + "/" + extendstg.toLowerCase() + ".xsl",
"-out", destinationFilepath, "-out", destinationFilepath,
"-TEXT"}; "-TEXT"};
org.apache.xalan.xslt.Process.main( args ); org.apache.xalan.xslt.Process.main( args );
System.out.println("Generated record: " + destinationFilepath); System.out.println("Generated "+suffix+": " + destinationFilepath);
// Generate test (if not already generated) // Generate test (if not already generated)
destinationPath = testSrcPathDir + "/" + packageName ; destinationPath = testSrcPathDir + "/" + packageName ;

View File

@ -76,7 +76,7 @@ import org.apache.poi.util.HexDump;
<xsl:apply-templates select="author"/> <xsl:apply-templates select="author"/>
*/ */
public class <xsl:value-of select="@name"/>Type public class <xsl:value-of select="@name"/>Type
extends HDFType implements HDFType
{ {
public final static short sid = <xsl:value-of select="@id"/>; public final static short sid = <xsl:value-of select="@id"/>;
<xsl:for-each select="//fields/field"> private <xsl:value-of select="recutil:getType(@size,@type,10)"/><xsl:text> </xsl:text><xsl:value-of select="recutil:getFieldName(position(),@name,0)"/>; <xsl:for-each select="//fields/field"> private <xsl:value-of select="recutil:getType(@size,@type,10)"/><xsl:text> </xsl:text><xsl:value-of select="recutil:getFieldName(position(),@name,0)"/>;