[Idrs-commit] CVS: Idrs/dev/src/net/sourceforge/idrs/deploy/macro MacroToXML.java,1.16,1.17
Brought to you by:
bigman921
|
From: Marc B. <big...@us...> - 2002-04-13 16:06:41
|
Update of /cvsroot/idrs/Idrs/dev/src/net/sourceforge/idrs/deploy/macro
In directory usw-pr-cvs1:/tmp/cvs-serv29359/dev/src/net/sourceforge/idrs/deploy/macro
Modified Files:
MacroToXML.java
Log Message:
added YesNo and formInput tags
Index: MacroToXML.java
===================================================================
RCS file: /cvsroot/idrs/Idrs/dev/src/net/sourceforge/idrs/deploy/macro/MacroToXML.java,v
retrieving revision 1.16
retrieving revision 1.17
diff -C2 -d -r1.16 -r1.17
*** MacroToXML.java 5 Apr 2002 14:37:52 -0000 1.16
--- MacroToXML.java 13 Apr 2002 16:06:35 -0000 1.17
***************
*** 36,39 ****
--- 36,40 ----
boolean inTag;
boolean wasScript;
+
String rmlNS;
Stack writeStack;
***************
*** 59,62 ****
--- 60,64 ----
textBuff = new StringBuffer();
wasScript = false;
+
this.rmlNS=rmlNS;
***************
*** 342,345 ****
--- 344,349 ----
int begin=0, end=0,tmp,retEnd;
+ int tokBegin, tokEnd;
+
char c;
c = tag.charAt(1);
***************
*** 370,380 ****
while (tok.hasMoreTokens() && tok.countTokens() != 1) {
token = tok.nextToken();
! out.write(token);
out.write("\"");
out.write(xmlEncode(tok.nextToken()));
out.write("\"");
! }
--- 374,442 ----
+
+ tokBegin = 0;
+ tokEnd = atts.indexOf("\"",tokBegin + 1);
+ boolean inQuote = false;
+
+
+ while (tokEnd != -1) {
+ //out.write("<i> " + atts.substring(tokBegin,tokEnd) + " " + inQuote + " </i>");
+
+
+ if (inQuote) {
+ out.write(atts.substring(tokBegin,tokEnd-1));
+ inQuote = false;
+ out.write(xmlEncode("\""));
+ }
+ else {
+ out.write(atts.substring(tokBegin,tokEnd));
+ out.write("\"");
+
+ }
+
+
+
+ tokBegin = tokEnd+1;
+ tokEnd = atts.indexOf("\"",tokBegin+1);
+ //out.write("<i> " + atts.substring(tokBegin,tokEnd) + " " + inQuote + " </i>");
+
+
+
+ if (atts.charAt(tokEnd-1) == '\\') {
+ out.write(xmlEncode(atts.substring(tokBegin,tokEnd-1)));
+ out.write(xmlEncode("\""));
+ inQuote = true;
+ }
+ else {
+ out.write(xmlEncode(atts.substring(tokBegin,tokEnd)));
+ inQuote = false;
+ out.write("\"");
+ }
+
+ /*
+ if (atts.charAt(tokBegin-2) == '\\') {
+ out.write(xmlEncode(atts.substring(tokBegin-1,tokEnd)));
+ out.write(xmlEncode(xmlEncode("\"")));
+ }
+ else {
+ out.write(xmlEncode(atts.substring(tokBegin,tokEnd)));
+ out.write("\"");
+ }*/
+
+ tokBegin = tokEnd + 1;
+ tokEnd = atts.indexOf("\"",tokBegin);
+
+ }
+ out.write(atts.substring(tokBegin));
+
+
+ /*
while (tok.hasMoreTokens() && tok.countTokens() != 1) {
token = tok.nextToken();
! out.write(xmlEncode(token));
out.write("\"");
out.write(xmlEncode(tok.nextToken()));
out.write("\"");
! }*/
***************
*** 435,439 ****
case '>' : buffer.append(">"); break;
case '\'' : buffer.append("'"); break;
! case '\"' : buffer.append("""); break;
default : buffer.append(txt.charAt(i));
}
--- 497,501 ----
case '>' : buffer.append(">"); break;
case '\'' : buffer.append("'"); break;
! case '"' : buffer.append("""); break;
default : buffer.append(txt.charAt(i));
}
|