[Idrs-commit] CVS: Idrs/dev/src/net/sourceforge/idrs/deploy/macro MacroToXML.java,1.15,1.16
Brought to you by:
bigman921
|
From: Marc B. <big...@us...> - 2002-04-05 15:29:56
|
Update of /cvsroot/idrs/Idrs/dev/src/net/sourceforge/idrs/deploy/macro
In directory usw-pr-cvs1:/tmp/cvs-serv14497/dev/src/net/sourceforge/idrs/deploy/macro
Modified Files:
MacroToXML.java
Log Message:
bug fixes, documentation
Index: MacroToXML.java
===================================================================
RCS file: /cvsroot/idrs/Idrs/dev/src/net/sourceforge/idrs/deploy/macro/MacroToXML.java,v
retrieving revision 1.15
retrieving revision 1.16
diff -C2 -d -r1.15 -r1.16
*** MacroToXML.java 23 Mar 2002 04:48:28 -0000 1.15
--- MacroToXML.java 5 Apr 2002 14:37:52 -0000 1.16
***************
*** 35,38 ****
--- 35,39 ----
boolean lastOwnLine;
boolean inTag;
+ boolean wasScript;
String rmlNS;
Stack writeStack;
***************
*** 57,60 ****
--- 58,62 ----
writeStack = new Stack();
textBuff = new StringBuffer();
+ wasScript = false;
this.rmlNS=rmlNS;
***************
*** 180,183 ****
--- 182,187 ----
out.write(">");
+ wasScript = true;
+
return end + 2;
}
***************
*** 197,201 ****
if (this.ownLine) {
! if (shouldWrite() && hasCR && !lastOwnLine)
out.write("<" + info.getNameSpace() + ":" + info.getTextTag() + ">");
--- 201,205 ----
if (this.ownLine) {
! if ((shouldWrite() && hasCR && !lastOwnLine) || wasScript)
out.write("<" + info.getNameSpace() + ":" + info.getTextTag() + ">");
***************
*** 209,217 ****
}
! if (shouldWrite() && hasCR && !lastOwnLine)
out.write("</" + info.getNameSpace() + ":" + info.getTextTag() + ">");
if (hasCR)
out.write(xmlEncode(txt.substring(txt.lastIndexOf('\n'))));
}
--- 213,223 ----
}
! if ((shouldWrite() && hasCR && !lastOwnLine) || wasScript)
out.write("</" + info.getNameSpace() + ":" + info.getTextTag() + ">");
if (hasCR)
out.write(xmlEncode(txt.substring(txt.lastIndexOf('\n'))));
+
+
}
***************
*** 222,235 ****
}
! if (shouldWrite())
out.write("<" + info.getNameSpace() + ":" + info.getTextTag() + ">");
out.write(xmlEncode(txt));
! if (shouldWrite())
out.write("</" + info.getNameSpace() + ":" + info.getTextTag() + ">");
}
!
lookLastTag = false;
inSimple = false;
--- 228,241 ----
}
! if (shouldWrite() || wasScript)
out.write("<" + info.getNameSpace() + ":" + info.getTextTag() + ">");
out.write(xmlEncode(txt));
! if (shouldWrite() || wasScript)
out.write("</" + info.getNameSpace() + ":" + info.getTextTag() + ">");
}
! wasScript = false;
lookLastTag = false;
inSimple = false;
***************
*** 242,246 ****
*/
protected int readTag(int begin) {
! return rmlSrc.indexOf(">", begin)+1;
}
--- 248,261 ----
*/
protected int readTag(int begin) {
! int indexGT, indexLT;
! indexGT = rmlSrc.indexOf(">", begin);
! indexLT = rmlSrc.indexOf("<", begin+1);
! if (indexLT == -1 || indexGT < indexLT) {
! return indexGT + 1;
! }
! else {
! return indexLT;
! }
! //return rmlSrc.indexOf(">", begin) + 1;
}
|