projects
/
org.ibex.core.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
fixed statics bug
[org.ibex.core.git]
/
src
/
org
/
ibex
/
Template.java
diff --git
a/src/org/ibex/Template.java
b/src/org/ibex/Template.java
index
28ff215
..
0461dbc
100644
(file)
--- a/
src/org/ibex/Template.java
+++ b/
src/org/ibex/Template.java
@@
-155,31
+155,19
@@
public class Template {
String initial_uri = "";
public TemplateHelper(String sourceName, Object s, Ibex ibex) throws XML.Exn, IOException, JSExn {
String initial_uri = "";
public TemplateHelper(String sourceName, Object s, Ibex ibex) throws XML.Exn, IOException, JSExn {
- System.out.println("1");
this.sourceName = sourceName;
this.sourceName = sourceName;
- System.out.println("2");
this.ibex = ibex;
this.ibex = ibex;
- System.out.println("3");
InputStream is = Stream.getInputStream(s);
InputStream is = Stream.getInputStream(s);
- System.out.println("4");
Ibex.Blessing b = Ibex.Blessing.getBlessing(s).parent;
Ibex.Blessing b = Ibex.Blessing.getBlessing(s).parent;
- System.out.println("5");
- /*
while(b != null) {
if(b.parentkey != null) initial_uri = b.parentkey + (initial_uri.equals("") ? "" : "." + initial_uri);
b = b.parent;
}
while(b != null) {
if(b.parentkey != null) initial_uri = b.parentkey + (initial_uri.equals("") ? "" : "." + initial_uri);
b = b.parent;
}
- */
initial_uri = "";
initial_uri = "";
- System.out.println("6");
parse(new InputStreamReader(is));
parse(new InputStreamReader(is));
- System.out.println("7");
JS staticScript = parseScript(static_content, static_content_start);
JS staticScript = parseScript(static_content, static_content_start);
- System.out.println("8");
t.staticScope = new PerInstantiationScope(null, ibex, null, null);
t.staticScope = new PerInstantiationScope(null, ibex, null, null);
- System.out.println("9");
if (staticScript != null) JS.cloneWithNewParentScope(staticScript, t.staticScope).call(null, null, null, null, 0);
if (staticScript != null) JS.cloneWithNewParentScope(staticScript, t.staticScope).call(null, null, null, null, 0);
- System.out.println("10");
}
private JS parseScript(StringBuffer content, int content_start) throws IOException {
}
private JS parseScript(StringBuffer content, int content_start) throws IOException {
@@
-245,11
+233,10
@@
public class Template {
// process attributes into Vecs, dealing with any XML Namespaces in the process
ATTR: for (int i=0; i < c.getAttrLen(); i++) {
// process attributes into Vecs, dealing with any XML Namespaces in the process
ATTR: for (int i=0; i < c.getAttrLen(); i++) {
- //#switch(c.getAttrKey(i))
- case "id":
+ if (c.getAttrKey(i).equals("id")) {
t.id = c.getAttrVal(i).toString().intern();
continue ATTR;
t.id = c.getAttrVal(i).toString().intern();
continue ATTR;
- //#end
+ }
// treat value starting with '.' as resource reference
String uri = c.getAttrUri(i); if (!uri.equals("")) uri = '.' + uri;
// treat value starting with '.' as resource reference
String uri = c.getAttrUri(i); if (!uri.equals("")) uri = '.' + uri;