Commit d9008fa0 authored by Fabien Triolet's avatar Fabien Triolet
Browse files

Corrected some bug with import

parent 7ed2b6d3
/**
* $Id: Transmorpher.java,v 1.2 2002-11-15 15:12:56 triolet Exp $
* $Id: Transmorpher.java,v 1.3 2002-11-18 16:08:40 triolet Exp $
*
* Transmorpher
*
......@@ -364,7 +364,13 @@ public class Transmorpher extends Observable {
System.out.println("</transmorpher>");
} //end generate XML
public void generateStylesheet() throws TMException,IOException{
for (ListIterator l = transformations.listIterator(); l.hasNext();) {
Transformation t = ((Transformation)l.next());
if (t instanceof Ruleset) ((Ruleset)t).generateXSLTStylesheet(reloc);
else if (t instanceof Query) ((Query)t).generateXSLTStylesheet(reloc);
}
}
/** Generates Java code for the transformation **/
public final void generateExec(String _reloc)
throws TransformerException,
......@@ -373,11 +379,11 @@ public class Transmorpher extends Observable {
SAXException,
IOException {
if(_reloc!=null) reloc=_reloc;
for (ListIterator l = transformations.listIterator(); l.hasNext();) {
Transformation t = ((Transformation)l.next());
if (t instanceof Ruleset) ((Ruleset)t).generateXSLTStylesheet(reloc);
else if (t instanceof Query) ((Query)t).generateXSLTStylesheet(reloc);
} //end for
generateStylesheet();
for (ListIterator l = imports.listIterator(0); l.hasNext();) {
((Transmorpher)l.next()).generateStylesheet();
}
//end for
if ( getMain() != null ){
iProcessFactory = new TProcessFactory(defexterns,debug);
iExecutionStructure = getMain().createMainProcess(iProcessFactory);
......
/**
* $Id: AddAtt.java,v 1.1 2002-11-06 14:08:21 serge Exp $
* $Id: AddAtt.java,v 1.2 2002-11-18 16:08:40 triolet Exp $
*
* Transmorpher
*
......@@ -55,7 +55,7 @@ public class AddAtt implements Rule {
file.writeln(6,"<!-- Adding attributes "+match+" -->");
file.write(6,"<xsl:attribute name=\""+match+"\">");
file.write(value);
file.writeln(6,"</xsl:attribute>");
file.write("</xsl:attribute>");
file.writeln("");
}
......
/**
* $Id: RuleSetParser.java,v 1.1 2002-11-06 14:08:21 serge Exp $
* $Id: RuleSetParser.java,v 1.2 2002-11-18 16:08:40 triolet Exp $
*
* Transmorpher
*
......@@ -154,7 +154,7 @@ public class RuleSetParser extends FMParser{
currentRule.addRule( (Rule)rule );
}
} else if (localName.equals("addatt")) {
rule = (Rule)new AddTag(atts.getValue("match"),atts.getValue("value"));
rule = (Rule)new AddAtt(atts.getValue("match"),atts.getValue("value"));
if ( currentRule == null ) {
((Ruleset)currentTransformation).addRule( (Rule)rule );
} else {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment