From 5db4b83fcf6371a6398f53db462f230959f35a08 Mon Sep 17 00:00:00 2001 From: "Christian P. MOMON" Date: Tue, 23 Feb 2010 15:05:05 +0100 Subject: [PATCH] Devinsy integration for new ledb-admin project. --- .classpath | 11 + .project | 36 + .settings/.jsdtscope | 11 + .settings/org.eclipse.jdt.core.prefs | 12 + ...clipse.jst.common.project.facet.core.prefs | 4 + .settings/org.eclipse.wst.common.component | 12 + ....eclipse.wst.common.project.facet.core.xml | 9 + ...rg.eclipse.wst.jsdt.ui.superType.container | 1 + .../org.eclipse.wst.jsdt.ui.superType.name | 1 + build/classes/XidDemo.class | Bin 0 -> 6949 bytes build/classes/XidTest$MONTHS.class | Bin 0 -> 1479 bytes build/classes/XidTest.class | Bin 0 -> 5114 bytes build/classes/fr/devinsy/xid/Attributes.class | Bin 0 -> 1590 bytes build/classes/fr/devinsy/xid/Data.class | Bin 0 -> 6839 bytes .../classes/fr/devinsy/xid/DomPresenter.class | Bin 0 -> 3666 bytes .../fr/devinsy/xid/FilePresenter.class | Bin 0 -> 3921 bytes .../xid/IdData$IterationStrategy.class | Bin 0 -> 1343 bytes .../classes/fr/devinsy/xid/IdData$MODE.class | Bin 0 -> 1107 bytes build/classes/fr/devinsy/xid/IdData.class | Bin 0 -> 2629 bytes build/classes/fr/devinsy/xid/IdDataCore.class | Bin 0 -> 116 bytes .../classes/fr/devinsy/xid/IdsDataById.class | Bin 0 -> 1006 bytes .../fr/devinsy/xid/IdsDataByIndex.class | Bin 0 -> 495 bytes .../fr/devinsy/xid/ParserErrorHandler.class | Bin 0 -> 2648 bytes build/classes/fr/devinsy/xid/Presenter.class | Bin 0 -> 21837 bytes .../fr/devinsy/xid/StringPresenter.class | Bin 0 -> 4390 bytes build/classes/fr/devinsy/xid/TagData.class | Bin 0 -> 515 bytes .../classes/fr/devinsy/xid/TagsDataById.class | Bin 0 -> 965 bytes build/classes/fr/devinsy/xid/testXid.html | 79 + build/classes/fr/devinsy/xid/testXid.t | 69 + build/classes/fr/devinsy/xid/xhtml-lat1.ent | 196 +++ .../classes/fr/devinsy/xid/xhtml-special.ent | 82 + build/classes/fr/devinsy/xid/xhtml-symbol.ent | 237 +++ .../fr/devinsy/xid/xhtml1-frameset.dtd | 1235 +++++++++++++++ .../fr/devinsy/xid/xhtml1-transitional.dtd | 1210 +++++++++++++++ src/fr/devinsy/xid/Attributes.java | 82 + src/fr/devinsy/xid/Data.java | 390 +++++ src/fr/devinsy/xid/DomPresenter.java | 191 +++ src/fr/devinsy/xid/FilePresenter.java | 167 +++ src/fr/devinsy/xid/IdData.java | 180 +++ src/fr/devinsy/xid/IdDataCore.java | 15 + src/fr/devinsy/xid/IdsDataById.java | 42 + src/fr/devinsy/xid/IdsDataByIndex.java | 21 + src/fr/devinsy/xid/ParserErrorHandler.java | 159 ++ src/fr/devinsy/xid/Presenter.java | 1331 +++++++++++++++++ src/fr/devinsy/xid/StringPresenter.java | 195 +++ src/fr/devinsy/xid/TagData.java | 39 + src/fr/devinsy/xid/TagsDataById.java | 43 + src/fr/devinsy/xid/testXid.html | 79 + src/fr/devinsy/xid/testXid.t | 69 + src/fr/devinsy/xid/xhtml-lat1.ent | 196 +++ src/fr/devinsy/xid/xhtml-special.ent | 82 + src/fr/devinsy/xid/xhtml-symbol.ent | 237 +++ src/fr/devinsy/xid/xhtml1-frameset.dtd | 1235 +++++++++++++++ src/fr/devinsy/xid/xhtml1-transitional.dtd | 1210 +++++++++++++++ tests/XidTest.java | 238 +++ webapp-examples/META-INF/MANIFEST.MF | 3 + 56 files changed, 9409 insertions(+) create mode 100644 .classpath create mode 100644 .project create mode 100644 .settings/.jsdtscope create mode 100644 .settings/org.eclipse.jdt.core.prefs create mode 100644 .settings/org.eclipse.jst.common.project.facet.core.prefs create mode 100644 .settings/org.eclipse.wst.common.component create mode 100644 .settings/org.eclipse.wst.common.project.facet.core.xml create mode 100644 .settings/org.eclipse.wst.jsdt.ui.superType.container create mode 100644 .settings/org.eclipse.wst.jsdt.ui.superType.name create mode 100644 build/classes/XidDemo.class create mode 100644 build/classes/XidTest$MONTHS.class create mode 100644 build/classes/XidTest.class create mode 100644 build/classes/fr/devinsy/xid/Attributes.class create mode 100644 build/classes/fr/devinsy/xid/Data.class create mode 100644 build/classes/fr/devinsy/xid/DomPresenter.class create mode 100644 build/classes/fr/devinsy/xid/FilePresenter.class create mode 100644 build/classes/fr/devinsy/xid/IdData$IterationStrategy.class create mode 100644 build/classes/fr/devinsy/xid/IdData$MODE.class create mode 100644 build/classes/fr/devinsy/xid/IdData.class create mode 100644 build/classes/fr/devinsy/xid/IdDataCore.class create mode 100644 build/classes/fr/devinsy/xid/IdsDataById.class create mode 100644 build/classes/fr/devinsy/xid/IdsDataByIndex.class create mode 100644 build/classes/fr/devinsy/xid/ParserErrorHandler.class create mode 100644 build/classes/fr/devinsy/xid/Presenter.class create mode 100644 build/classes/fr/devinsy/xid/StringPresenter.class create mode 100644 build/classes/fr/devinsy/xid/TagData.class create mode 100644 build/classes/fr/devinsy/xid/TagsDataById.class create mode 100644 build/classes/fr/devinsy/xid/testXid.html create mode 100644 build/classes/fr/devinsy/xid/testXid.t create mode 100644 build/classes/fr/devinsy/xid/xhtml-lat1.ent create mode 100644 build/classes/fr/devinsy/xid/xhtml-special.ent create mode 100644 build/classes/fr/devinsy/xid/xhtml-symbol.ent create mode 100644 build/classes/fr/devinsy/xid/xhtml1-frameset.dtd create mode 100644 build/classes/fr/devinsy/xid/xhtml1-transitional.dtd create mode 100644 src/fr/devinsy/xid/Attributes.java create mode 100644 src/fr/devinsy/xid/Data.java create mode 100644 src/fr/devinsy/xid/DomPresenter.java create mode 100644 src/fr/devinsy/xid/FilePresenter.java create mode 100644 src/fr/devinsy/xid/IdData.java create mode 100644 src/fr/devinsy/xid/IdDataCore.java create mode 100644 src/fr/devinsy/xid/IdsDataById.java create mode 100644 src/fr/devinsy/xid/IdsDataByIndex.java create mode 100644 src/fr/devinsy/xid/ParserErrorHandler.java create mode 100644 src/fr/devinsy/xid/Presenter.java create mode 100644 src/fr/devinsy/xid/StringPresenter.java create mode 100644 src/fr/devinsy/xid/TagData.java create mode 100644 src/fr/devinsy/xid/TagsDataById.java create mode 100644 src/fr/devinsy/xid/testXid.html create mode 100644 src/fr/devinsy/xid/testXid.t create mode 100644 src/fr/devinsy/xid/xhtml-lat1.ent create mode 100644 src/fr/devinsy/xid/xhtml-special.ent create mode 100644 src/fr/devinsy/xid/xhtml-symbol.ent create mode 100644 src/fr/devinsy/xid/xhtml1-frameset.dtd create mode 100644 src/fr/devinsy/xid/xhtml1-transitional.dtd create mode 100644 tests/XidTest.java create mode 100644 webapp-examples/META-INF/MANIFEST.MF diff --git a/.classpath b/.classpath new file mode 100644 index 0000000..3cff4fe --- /dev/null +++ b/.classpath @@ -0,0 +1,11 @@ + + + + + + + + + + + diff --git a/.project b/.project new file mode 100644 index 0000000..50cb5de --- /dev/null +++ b/.project @@ -0,0 +1,36 @@ + + + Xid + + + + + + org.eclipse.wst.jsdt.core.javascriptValidator + + + + + org.eclipse.jdt.core.javabuilder + + + + + org.eclipse.wst.common.project.facet.core.builder + + + + + org.eclipse.wst.validation.validationbuilder + + + + + + org.eclipse.wst.common.project.facet.core.nature + org.eclipse.jdt.core.javanature + org.eclipse.wst.common.modulecore.ModuleCoreNature + org.eclipse.jem.workbench.JavaEMFNature + org.eclipse.wst.jsdt.core.jsNature + + diff --git a/.settings/.jsdtscope b/.settings/.jsdtscope new file mode 100644 index 0000000..bbb8e68 --- /dev/null +++ b/.settings/.jsdtscope @@ -0,0 +1,11 @@ + + + + + + + + + + + diff --git a/.settings/org.eclipse.jdt.core.prefs b/.settings/org.eclipse.jdt.core.prefs new file mode 100644 index 0000000..7b0c98d --- /dev/null +++ b/.settings/org.eclipse.jdt.core.prefs @@ -0,0 +1,12 @@ +#Thu Oct 01 17:56:30 CEST 2009 +eclipse.preferences.version=1 +org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled +org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6 +org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve +org.eclipse.jdt.core.compiler.compliance=1.6 +org.eclipse.jdt.core.compiler.debug.lineNumber=generate +org.eclipse.jdt.core.compiler.debug.localVariable=generate +org.eclipse.jdt.core.compiler.debug.sourceFile=generate +org.eclipse.jdt.core.compiler.problem.assertIdentifier=error +org.eclipse.jdt.core.compiler.problem.enumIdentifier=error +org.eclipse.jdt.core.compiler.source=1.6 diff --git a/.settings/org.eclipse.jst.common.project.facet.core.prefs b/.settings/org.eclipse.jst.common.project.facet.core.prefs new file mode 100644 index 0000000..2c09e01 --- /dev/null +++ b/.settings/org.eclipse.jst.common.project.facet.core.prefs @@ -0,0 +1,4 @@ +#Thu Oct 01 17:01:30 CEST 2009 +classpath.helper/org.eclipse.jdt.launching.JRE_CONTAINER\:\:org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType\:\:jdk1.6.0_11/owners=jst.java\:6.0 +classpath.helper/org.eclipse.jst.server.core.container\:\:org.eclipse.jst.server.tomcat.runtimeTarget\:\:Apache\ Tomcat\ v6.0/owners=jst.web\:2.5 +eclipse.preferences.version=1 diff --git a/.settings/org.eclipse.wst.common.component b/.settings/org.eclipse.wst.common.component new file mode 100644 index 0000000..b06506e --- /dev/null +++ b/.settings/org.eclipse.wst.common.component @@ -0,0 +1,12 @@ + + + + + + + + + + + + diff --git a/.settings/org.eclipse.wst.common.project.facet.core.xml b/.settings/org.eclipse.wst.common.project.facet.core.xml new file mode 100644 index 0000000..53d628c --- /dev/null +++ b/.settings/org.eclipse.wst.common.project.facet.core.xml @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/.settings/org.eclipse.wst.jsdt.ui.superType.container b/.settings/org.eclipse.wst.jsdt.ui.superType.container new file mode 100644 index 0000000..3bd5d0a --- /dev/null +++ b/.settings/org.eclipse.wst.jsdt.ui.superType.container @@ -0,0 +1 @@ +org.eclipse.wst.jsdt.launching.baseBrowserLibrary \ No newline at end of file diff --git a/.settings/org.eclipse.wst.jsdt.ui.superType.name b/.settings/org.eclipse.wst.jsdt.ui.superType.name new file mode 100644 index 0000000..05bd71b --- /dev/null +++ b/.settings/org.eclipse.wst.jsdt.ui.superType.name @@ -0,0 +1 @@ +Window \ No newline at end of file diff --git a/build/classes/XidDemo.class b/build/classes/XidDemo.class new file mode 100644 index 0000000000000000000000000000000000000000..001c22fc6995c42ceb77727bfd904d274cc00dc6 GIT binary patch literal 6949 zcmc&(d3+Sr9sjul5ly&Np_MQ-0Z~JNdVCn zwUm0|eN!u*wVtRE1*}?8i%0Rk(Y9XH3y*pq{k=Ih$z}=kuO=Vzd+*KfzTUyMpC5b( zzywz5hrr-ptjDXgR>Kd8VZc(gLk%a@R7-en<5I23V#rGxEiIbKP#81Jmay8UHYKz$ zElye*j@h3o801J(QcvktltC;hUC1C!H{x0W`k}uc0fwSpq(`c0y=l6UYSvrYP1Q2Y z0QP~*kl*C45%mBlehg&TzZbP5IDjDbW9Z+aS@R9Uauykem6YyQ)qF4v4#0=JdlT+VHh?gf;EQXG?Jay|d;k+LktoP_p5G4bE_ixUO{Xh%??{Gy zV|q%fZEtPV%zCvksWB)qqe)FJR85`F-9?dfr7Vir=}`a?Qv#UGBQ048JxvUu zy{5KS$e6(pn5iX`Mre^?CgURta1?6%n8^^d9o~~5fLWML< zWad$z44Q?}GN}G!%6!WS$jOwRb!~dwj))A(R$tm$k)%+yGYo80n@(ymjrLT$Jk*$M z*QgcLVp#yov4W~YZEMp~@o5%iZ)3YfYEQ}Km25kEyTq>jm6Y>T>Y69c)Z%2tX{1jR zuTvSnAx*i?cG+@0P7mM=u1A2Jkx@d%Zy65GgxoWfhniNcY z>hBq*IRsg@Qxv*W*)HVdy&Pz>Ih$eX|HLNSF*cWT84k~ApK(BzCbsjqCK=b+wC6L7 z+6yN|Wn4fJSZ0`UioiuQRFiE9yR0wam3t{eNsgG;^h$0!#FrC&qp5ZnGOnby)09xn zq)wT3HLb_Bq@~JON1Z}zN)X1i)a#m!IEl=i`S0wKEw+30`joA*R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;q$&!U{lyA158xD>%7ZQP10ZBB(ZLAUdfHDY;k1U^(0K^!wrahR2hq5-aq++y z`o^&7AkNXYm9U+@7+Qt|4{tAFsP7I;)2ynqeI0jGSflTu<_lg%b)8trx8NDHS$eX9 zhEO3cK#rrN^00kld*E=b0Vh$y2&qQ$G=$WJJlTSVm9NO(3;IdACK6zyvyDtaER*7FVO`Bp{G6P$jhGW{N>Kd4NfE44 zEaBy|IsPXc{~L@YA^JM1oSZHiS|ig%5zgVxxvYg9d@AnbGx>bZ3}i4!IHvhlGI2SEa5b{H8M|;h0ecrgc`xDm z08czZus%+3K8XwQ3_Lu?hu4ePEgG;#OyfIC$3-H+=Tr(8iw(F`Y{q3`J1!T)d=V9} zPh7%x&sDfW+=MH|t$f?uiT&apTrKXyHR54DYaYe5;t5g zQnCp&sNzU5mA=guFNve5Q}Fz1q4|Z=DV`S7X=Mb9#Is@ssU}L_=9gMCf7F{vz6No$ Qn8lH=0x_Ha=A6>{Kf%Y3!vFvP literal 0 HcmV?d00001 diff --git a/build/classes/fr/devinsy/xid/Attributes.class b/build/classes/fr/devinsy/xid/Attributes.class new file mode 100644 index 0000000000000000000000000000000000000000..a7c60bc39068b4b27d85ab4b6225106eb0d7d3dc GIT binary patch literal 1590 zcmah}*-{fh6g{1tFvwz9RRoogOahT03I+9d&eLZG~O{=4eh;P#M)L(h70906_*(LGygcwZV1{=LEA+nnew0FsIZa{msI@v86=Zi zz8?(3-UUt3w+d@ylfG4QA%YP>LMkO(#3d?u*R~iYgEvO+~M!bygvHFZl@EZd;dDYu5; z=Q;gXS;0>81k98$NUs{E{{TZDqKMHPr(FmM+K~n{(2PdVK#w4Wz z-H4zEZM2fyB($T0b^_o$jRIhXGDU7o&K)7uh%i8OgAPKMo8=);KB0FI1|x=E4{M1e z3(*NVmp??`(?+x`6(Kul18$y=mOwu)6AInM0Ifo_9`teF5Szd)%DF>ad5a-A_X+7| zVwd@X{4qw4P$b5QLre+Y10(|q!Vr#hkQc(P1SUws6vn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@EN5Y@M0Z3 z?KN=in82j|-i|3u(?2^Yo~?RT{~`{deeHA1ED&nyF3#M+{4JbY#dicchgDdEk;Qjo~#i{A11V8ZCaR)4ry;4pBHE=5w0)d$~5dSDU5qNBoTZ zN9gM_{2aevy$`VTe#v*dVAN(J==})aCuBnl`h5c*8oY*RX)gc+TMzP2juCuZO)LIM zmk}=N%Jh;sq2(TLPg6IsJsA#|ONN!|;n#Pk`W{eLZ8)FM?{#*p8!VvD*ad!vgCs(_ z*>T;Fy0qT;$bPY2dtHIJ+Jnu7xJINr&1Zw)`DYMGkd5?Wi&SQ$T9(yad;;9(pM?+J n@wEZI?RbhE;CisDLmWluk<2PSZB{?;Yy2c7r|@e%`^|p<-58K- literal 0 HcmV?d00001 diff --git a/build/classes/fr/devinsy/xid/IdData$IterationStrategy.class b/build/classes/fr/devinsy/xid/IdData$IterationStrategy.class new file mode 100644 index 0000000000000000000000000000000000000000..d66b8ec1d839224b3aa1f7ee54a01b3b91e9534c GIT binary patch literal 1343 zcmb7D+fEZv6kUgDJ8c=c6sX)p5tOzd6%@R*5D1qzai9rPN+v!uLp#(VWoo8VV!y!O z(eeP%NPPCAjQbobj1iOChwig>&)R40-L=2}_dk-1 z2xm)G+p)b>1}Tv&Fa$PgWh;ze6bvy10~lloW!qQc3GI3aG#uNhWYlCKLU-c|f(V5n zb1eZsX+8a`Wb4)gldAtz=dU zrfYL7l2J&Aky7uiT_6_VJ?yEyz?mLFfZc~L!YmsX5F(+6r}N(A!53&*(}xG zHEE>&zH^7iR>{k#zES*6(JUBbAt-mmu;Qn+$JMzoA~{AxG7Hc*%B@0-0NLsmdWhdk=mTN? zseA!5Vtvv%`p+;V!0mtl!vc&31sD_HPDp?W0q)5HOoqQw1*wH0-3YWWtQ)}=#&jdp z!h~+fEllcXnEFIdb>RVhhe!Yr$3v0fS=yPls0C_`Hz%iN$ImfyGf5EzWF&ZZv>i#L z+Vo|b2&czem@-~VsY@fvwe3h_7nq&-%r|57(Lel2{D5ChR}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P&zf`DjMiskGMfV*sy`c9bkgQE=IfT4-{#Sv%{IY~d|>BocEQ$>^}u$W zP5}C8&DcwHXfLp_b%sq@x!iH#{Z4#CC%)xhz3+Hq-}`9#Jtz8{+w3B|bfO8Oo72bm z(BrEaG048CH{uDkKlOq7jgVa^jo8Arhm~~JKr@w&|3Wsm+9KQresEx9lQO{5CU}P* zdxvX6SYN(wbnEL!p84qlA)l}gq>xWp4Z#~p25;n7f<5zroxc$Y7Q$zad>y+SySYwq PH#gtU|5XI?^Zow;@eK|t literal 0 HcmV?d00001 diff --git a/build/classes/fr/devinsy/xid/IdDataCore.class b/build/classes/fr/devinsy/xid/IdDataCore.class new file mode 100644 index 0000000000000000000000000000000000000000..0bf70c666228d39122c8a9ab21555df08b831cd5 GIT binary patch literal 116 zcmX^0Z`VEs1_mPrc6J6PMh3~WBK?%qvdp~VO8tt=6n)PWm&B4p=lr5nb_Nzk27#=^ zvPAuy#JqHU|D>$ccEvj6}9 literal 0 HcmV?d00001 diff --git a/build/classes/fr/devinsy/xid/IdsDataById.class b/build/classes/fr/devinsy/xid/IdsDataById.class new file mode 100644 index 0000000000000000000000000000000000000000..f797556c58e701d6c3dadff02790f4b48bcc45c1 GIT binary patch literal 1006 zcmaJ<%Wl(95IvLkt27PIrUgy8)@jVh&=4fFPlc@<{(24_bRxLb@spt@(Bh+O`KihjBp({_zVg5nJ~?<(AwHQ$IUnYbA;npB96wiFXmtb*HnnN7hvi4 literal 0 HcmV?d00001 diff --git a/build/classes/fr/devinsy/xid/IdsDataByIndex.class b/build/classes/fr/devinsy/xid/IdsDataByIndex.class new file mode 100644 index 0000000000000000000000000000000000000000..9270a0eb911dc93aa60226a3d4d00720992b0911 GIT binary patch literal 495 zcmaJ;%TB^T6g^W4l?DU>9~g~sr!H)wO9%@gCXmJr+WkOB9aE-BJ08Oyv9*npwj4OOhU(jE^I zkvHC7?%(ciw-^d-sif{OLkah;@c2JYV%XfINHt8aB$ z{~Tf$q>?O8wh0SM6pQp925ib$s+asSb&j(d$R9kS@{mDR$lC-3>M+qjjj|HK2t=I* OMFXpuU&DG9H$DO74|}u# literal 0 HcmV?d00001 diff --git a/build/classes/fr/devinsy/xid/ParserErrorHandler.class b/build/classes/fr/devinsy/xid/ParserErrorHandler.class new file mode 100644 index 0000000000000000000000000000000000000000..59d5547c4d0aba73290d420cff96a4249035d85c GIT binary patch literal 2648 zcma)8T~ixX7=BI&YzWI&NP$8rX`wX)XtYwr28#v3q5-N@D6OR|$r6@^4c%-g?PxC@ z_1fuZXS{Q!H(uxr4WrCBUi&xv8;_Uw6|_j#Z9BmDi}AAbV4j3)|w z0_T>kcv{~u%>3i{rjd@{)U3R2jagRCx}llrtZpgr3pA{18(KW8nVI8-c)@p3iF;JueVSI>rUt$i`=BnzIrD)iXxM)a-(#3tTL_Fyx*% z{$^~;Ff)m3G-_DZY%S|J%8%v>rY#^Q1Zs3iclShnq**2{ybD!BhH2Q>1S+CEvjYCn zTv`vJ0!=FF(NGP6Qz~kp%3X_!T6cF^MIBTH?Yp6uun(dQP4fC#6$%0Z^-06jrwVIJ zx^+ui$}*x*GMCb_vzledckj?|uNai0D|xKs43%sdS(T;d3t5I)r)5jy4$}J@l6IHe z^+?*zu2<6TqWUXZ-jT@xx+5>eRa}st#2ta!8Cy#|nAFxiW|fYB0_UU2(u~erzwMO6 z*k(#!w~d^c=$Tb;g*xq5gPWa^f{{(@Rsipks^d7K*^w+|i3Bl#_oUWWsdThFuRXIt z4B?uB_XRqR^sZu922h*P?R~)|{B;#07^Pa;`nqnW1Z8@d=UwLDHFYYh555E%%#{6sJ^7%i94v=PD+P=u;J+VTNS1G)ccE zj@x939ww_=-<4mW^O*byC|=*~wOwfsk?np51wiodxa_EilmESx5yk7F0Pe8?=G=zb z`>x==Ky!HwEHCR;5DRFM!7Zssfnfy-u^kDah`2X-Tk>h$*w16X-i(c4Yue*8(0&Lo#lUj+Q5Mq~P3>v~3jy z^iwbP+Y}i}+bPb)11iU{VFG4y1uLbG8*)svluz4BQUaV~!&dOG5`NBV4jJyNx$_~& zmD7qV@e*OVG|Qzmwu83$ZJc?Dj^B9Ihfc0- zsN#Bx4qND|m2>1Yns|B^?TGM;N?^i~+Ic=XbkXIx8s^i-GbOf#@KF0N+`5oK=lBAn zh&m9>?lljhl5gD(EPMJuu;y~G%LKb}3>YWi0nA#Wb z7hU8MTP%l7G7Zxuu#H~8^(6uKq2Ghecparxr7hp@`OIVB$uy<{`ACL?jFMBi=(-;N-nL3a`~G6 zzaf`ziT>S*x$sxQ%hAu&Np}C>4i>1&Vp4i4LYsPlw*KG2@$nZPO!hJ-YjeE~!6Me@ zc+7t=p1=Bs8Ql1lwr&Brt^GZx$TM`{2Uhft)+WFC@c4hZsTA)3 literal 0 HcmV?d00001 diff --git a/build/classes/fr/devinsy/xid/Presenter.class b/build/classes/fr/devinsy/xid/Presenter.class new file mode 100644 index 0000000000000000000000000000000000000000..f9e70fbabe6281ca8167340ccd7a9cf2d4e1f4bb GIT binary patch literal 21837 zcmcIs31C#!)jsFGH#0Ajmz@X$0R}{bECfYS6F?yZiG~D8Ab<-F$v~pX3?>s6wJt4H zt5&VrDsBZ8qqS~WheVWORj^vMR$JRzt6j9#>R+vYT@cLwo%`NQCJSi)wrVnW?sD$A z=brnW<=*)07mw~Fq9fHaK2l60R<)Nlh1a%3IyRK9Z)qxB*dFc(M`Gc2ADK+qXNA^= zN?Svb)upv7&k8rjn6j#B=2k9UQCGQe_M+MKwTqazf+?dS8tI6IBC#c**3Phj305$9 zTcfL2hufI~)zS9VrJ*&U#^!J-Dvvs=v|2ZnGi72}tfg^LG#XnNiZwIkR`*R>7i({c ztVXY+C)71m)mO}4Q9pZ5b>)Or?Gs$4CxGb*RZVk4vCxDnunk(#2!@4X;nf?M)TvcW z){Ms1mPku%7Lze)@)9PqBH9%8Qy%5}Xc*J*18`^4AvByRZFM;2u*+0DDTTX=)=)=B z`Q!sGE{(8so6^WHrBODelMMk@w?x7!vl9HbvV?=SCYl+n_$>16izU>X0p(v!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xid/StringPresenter.class new file mode 100644 index 0000000000000000000000000000000000000000..c16fc92d2bab7bcc352940952de2868ff4be2dad GIT binary patch literal 4390 zcmcgv-*X$)75=U*X(eSNJI0tOPMicVktI8#kP@(rA-402Dv3kf7(4XGT3Xw3WUX1P zk~pP6p+JEGr7g@*9+*C*FP$lEanhz`+Lvag)0xinotgY0ox0z>yI#vHDMR|uOtO1* ze|+bh?|kR%&ENm?$1eapf)6#c3G~g|*`j%=RH?3Juat_}bBZFXH=j)HE^Dr$E~6n$98mRNC@250#-*Sb_m24Ovkk&Fqo<{FkUvQ)!aZ! zuVN6mM@JYDfsTBsVxF!o&zbg=F;_OFt5(4%pEvB1{OwIfMwFv*v}31^9>inVh20u@ z1$G8V@)^>x2T_4U)iIn>;aSUaCJkp%8sDp9pInMxHs_3$m5u59bv%FvNk-8s2=plb zFF#ty7Omy%gjJ|5Gc!4P{vjQjJRfovOI3k=`G5<7T$1X0>-lk)bCU4`P3G&E^mj%v zD1bN);$aP0fzDt$b$ktvP!r}0HKRHLgZR{Et?USdi`H|cqQLP~F!%|>F>(!O$7=KQrcF@<9rqUE$l*y1 zBUDC!Oo^vs6i+dgbns-cDrd%4PttlHy$o!xThB?*BRa+~PNDJal(A5EcyHt3`VBlS za8$?RI3{qhA5{V;(8`A7W}|pkon|pOt1D&{Q%wJeY$u~pP`Z(k z6H}-1qZ*!Lr)bP-sa!PeC@8sI?xB%I(LIOSs5m6pq}(e1uX17sle4$FlUf!bGJmj18QZLRr!A0@#aVb2WN1 zWt*(0qn`UTQipwq+K~OWq2a{Y=^QD;n!wLe&6`qCC;z)R@8Dfyj#Wv^=r8NIf>riz z^NM2|1!s)e9k=)$t5Ba?z71{$T6Tk+hVQZUHa8W=RXoqk-6>j`X0OTx_5^osDNI&@ z)W}B1Q$MB*o9SkSNfCJwX!s#T+`7$Zc%$)CU2jQXriqY)zNy-7Rm#m&@3a4wRL9!_ z?|%g=|4(J8wi!%i?yJRp_c|1??>7EM--0tOh3bE{1m2U)AkETW*|@w3Z2f$C-(OiN zKh^Pd*^J_@?2eV>m8aXS3jgMEP`ZKr+}_R`V;j_6iKCFbcJRHO&lqn5)G2=r@h$(v zy2K6WzeCq&{LzMPKI41?9o!zry=oTR%hYzd_G*W!5nCF}8alT|+cYlU`_pp7C}?Q6B-pb|1pS z*umR*FCOFN@Nv5G1kxB*PV95xeJ3*95v6gORPMClQI5OOzD|gC4MM{~{$)x++;zw& z%cS*EX-YpRTP5JKH-7o$%CXaktTz~{P*=msn)WLnD%^4Z6U>Toz2zJ-_=4qd~v zJbxD+#FJrpY+o{b1DA#)$;bv!;wG-nBqP`H;&3P#l3cmUIk`lmno(jPs^(JNF$n4Wceqn9v8 zkDlS&EtcM^T#YEL&m(p?y3UReQEGop!|NJDQKDaGw4p82SZCh|?z{?QBmc$@o>`~h zw=5G&!m)s;pf_CwK`L2lv(wjRS7z`AeiT&ar*-P=q)W16@|3U6PEVZ@`yCH^n%E)k z>hQ4#sh0-mUn%IcyVZy8@S!_YV{m(}EP-|vz>hs6XFVgabVf9V|Evx^=EKMQ+{S$P zn3r1_!`mMGn{-Q7Sn?*s%n*CwyHcf@!DNUfES0}Wl-q0m#BTcq)B0Cs_Jn)bH=Fd$ zCVfdIl>;&fN##I@r(JP{iIu?n?AnpeBmBhu#B-{jZ`m@!={044iu_+Jk$NxFEo IRimH(7guBQv;Y7A literal 0 HcmV?d00001 diff --git a/build/classes/fr/devinsy/xid/TagData.class b/build/classes/fr/devinsy/xid/TagData.class new file mode 100644 index 0000000000000000000000000000000000000000..5f754ddb0bd58209c3aef99f42d77117950ea282 GIT binary patch literal 515 zcmZXQK~KU!5QX1D0VPGS0;1xQx<{qo+Me*b=c0k}Z3fDA+ZF)$smkY4y|E~R6R`E0-=UVz3>TYDQi z$y1)8`pg&Hl)gC;w-}l0Zdy&oExyYTq{}_$o z!xcmRT6!|-F=Sh9n?dXQjwm9FiVhtmhO#9+aW{XNh+v#J7?wZfuFc7n9MelJdXgbS z!&(cRF4Lt|T2`Fc<=)I3MS=8Y-L|c)c9m6)yd$xU7>xfMLviHKgQ>WYYDYa)Jy(J_ z0)?l_QSGCE4Vs(ue={gj5seb{ExNg+$!O*}E0jNCWShFefF?8?!k{lbfv|%ros>Y0 lx)SISsn~qyY=!!|!ZAfSi52Pzl`0UA2KGop1ysQf{s3nPW#<3@ literal 0 HcmV?d00001 diff --git a/build/classes/fr/devinsy/xid/TagsDataById.class b/build/classes/fr/devinsy/xid/TagsDataById.class new file mode 100644 index 0000000000000000000000000000000000000000..444d7dff60b12cb4fc2d3fd2106588c33ee6d814 GIT binary patch literal 965 zcmaJ<&2G~`5dOwZn#4|N6ABbUp|rFlX}}U(kWv+iR)|yy98$u06EEpj#;)vj)t-14 zo&YYb!~t>UU3dk=*s;JOgv;*E?0i2nyWf9)`3m4Mngtky+PlDZxGy-*8J4}=@Z zy!+u}@2vjgk}$ucJf(LDbM?l6klXVeX<`mn$}nLO7Q4!mucG%u861kCD+$%EKVkvF zG90JLoIX+^VYT}o&uv0Jl)B>(9@e{wcUO30yRQS~jobf##@)6X0~3VnW!%6D+dPRh z;b|8CdUz~Hx}9N6GmYsK!BDJU&D^B&+`Geagq2xF*#3B8zm=6w@r_xq*!@}=_pr|H znSijBh0pd{zMlQ3NeLo6D@`Z{Yr;`07kK!2Q16 z`)78hXECdl-8Q$uUGOI*+(I7nycak!P~EPS>`n+IAFq9sMy?YUEtc=zd33wd^_P-o7ANojKEDc7mF8B;~Im{ ztGJW$_Bf7tt>*Rx?ta5Yul0#T1ApvoqJ(;e+WJjxrPL*^-%O|tY$fOijEGqpzW^GN B+Pwe( literal 0 HcmV?d00001 diff --git a/build/classes/fr/devinsy/xid/testXid.html b/build/classes/fr/devinsy/xid/testXid.html new file mode 100644 index 0000000..78a308e --- /dev/null +++ b/build/classes/fr/devinsy/xid/testXid.html @@ -0,0 +1,79 @@ + + + + test + + + Test 01: No id attribute + XHTML: Hello world. + no Java code + Result: Hello world. + + Test 02: id attribute with empty model + XHTML: Hello world. + no Java code + Result: Hello world. + + + Test 03: model changing the text + XHTML: Hello world. + // Populate attributes of Test 03. + text = new TextModel (); + text.getAttributes ().appendAttribute ("style", "background: blue;"); + text.getAttributes ().appendAttribute ("style", "foreground: red;"); + text.getAttributes ().setAttribute ("class", "totoClass"); + text.setText ("mummy"); + datas.put ("test03", text); + Result: Hello world. + + + Test 04: model changing title + XHTML: Hello world. + // Populate attributes of Test 04. + text = new TextModel (); + text.getAttributes ().setAttribute ("title", "another title"); + datas.put ("test04", text); + Result: Hello world. + + + Test 05: model adding style attributes + XHTML: Hello world. + // Populate attributes of Test 05. + text = new TextModel (); + text.getAttributes ().appendAttribute ("style", "background: blue;"); + text.getAttributes ().appendAttribute ("style", "foreground: red;"); + text.getAttributes ().setAttribute ("class", "aClass"); + datas.put ("test05", text); + Result: Hello world. + + + Test 06: model appending style attributes + XHTML: Hello world. + // Populate attributes of Test 06. + text = new TextModel (); + text.getAttributes ().appendAttribute ("style", "foreground: red;"); + text.getAttributes ().setAttribute ("class", "aClass"); + datas.put ("test06", text); + Result: Hello world. + + + Test 07: image + XHTML: A picture pinguoin flottant. + // Populate attributes of Test 07. + text = new TextModel (); + text.getAttributes ().setAttribute ("width", "50%"); + datas.put ("test07", text); + Result: A picture pinguoin flottant. + + + Test 08: xhtml source contains no display order in a tag. + XHTML: Hello you there. + Result: Hello you there. + + + Test 09: dynamic addition of the nodisplay order. + XHTML: Hello you there. + Result: Hello you there. + + + \ No newline at end of file diff --git a/build/classes/fr/devinsy/xid/testXid.t b/build/classes/fr/devinsy/xid/testXid.t new file mode 100644 index 0000000..9037424 --- /dev/null +++ b/build/classes/fr/devinsy/xid/testXid.t @@ -0,0 +1,69 @@ + + + + test + + + Test 01: No id attribute + XHTML: Hello world. + no Java code + Result: Hello world. + + Test 02: id attribute with empty model + XHTML: Hello world. + no Java code + Result: Hello world. + + + Test 03: model changing the text + XHTML: Hello world. + // Populate attributes of Test 03. + text = new TextModel (); + text.getAttributes ().appendAttribute ("style", "background: blue;"); + text.getAttributes ().appendAttribute ("style", "foreground: red;"); + text.getAttributes ().setAttribute ("class", "totoClass"); + text.setText ("mummy"); + datas.put ("test03", text); + Result: Hello world. + + + Test 04: model changing title + XHTML: Hello world. + // Populate attributes of Test 04. + text = new TextModel (); + text.getAttributes ().setAttribute ("title", "another title"); + datas.put ("test04", text); + Result: Hello world. + + + Test 05: model adding style attributes + XHTML: Hello world. + // Populate attributes of Test 05. + text = new TextModel (); + text.getAttributes ().appendAttribute ("style", "background: blue;"); + text.getAttributes ().appendAttribute ("style", "foreground: red;"); + text.getAttributes ().setAttribute ("class", "aClass"); + datas.put ("test05", text); + Result: Hello world. + + + Test 06: model appending style attributes + XHTML: Hello world. + // Populate attributes of Test 06. + text = new TextModel (); + text.getAttributes ().appendAttribute ("style", "foreground: red;"); + text.getAttributes ().setAttribute ("class", "aClass"); + datas.put ("test06", text); + Result: Hello world. + + + Test 07: image + XHTML: A picture pinguoin flottant. + // Populate attributes of Test 07. + text = new TextModel (); + text.getAttributes ().setAttribute ("width", "50%"); + datas.put ("test07", text); + Result: A picture pinguoin flottant. + + + \ No newline at end of file diff --git a/build/classes/fr/devinsy/xid/xhtml-lat1.ent b/build/classes/fr/devinsy/xid/xhtml-lat1.ent new file mode 100644 index 0000000..ffee223 --- /dev/null +++ b/build/classes/fr/devinsy/xid/xhtml-lat1.ent @@ -0,0 +1,196 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/build/classes/fr/devinsy/xid/xhtml-special.ent b/build/classes/fr/devinsy/xid/xhtml-special.ent new file mode 100644 index 0000000..cead4e8 --- /dev/null +++ b/build/classes/fr/devinsy/xid/xhtml-special.ent @@ -0,0 +1,82 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/build/classes/fr/devinsy/xid/xhtml-symbol.ent b/build/classes/fr/devinsy/xid/xhtml-symbol.ent new file mode 100644 index 0000000..63c2abf --- /dev/null +++ b/build/classes/fr/devinsy/xid/xhtml-symbol.ent @@ -0,0 +1,237 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/build/classes/fr/devinsy/xid/xhtml1-frameset.dtd b/build/classes/fr/devinsy/xid/xhtml1-frameset.dtd new file mode 100644 index 0000000..1a00936 --- /dev/null +++ b/build/classes/fr/devinsy/xid/xhtml1-frameset.dtd @@ -0,0 +1,1235 @@ + + + + + +%HTMLlat1; + + +%HTMLsymbol; + + +%HTMLspecial; + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/build/classes/fr/devinsy/xid/xhtml1-transitional.dtd b/build/classes/fr/devinsy/xid/xhtml1-transitional.dtd new file mode 100644 index 0000000..e22581b --- /dev/null +++ b/build/classes/fr/devinsy/xid/xhtml1-transitional.dtd @@ -0,0 +1,1210 @@ + + + + + +%HTMLlat1; + + +%HTMLsymbol; + + +%HTMLspecial; + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/fr/devinsy/xid/Attributes.java b/src/fr/devinsy/xid/Attributes.java new file mode 100644 index 0000000..98b2caf --- /dev/null +++ b/src/fr/devinsy/xid/Attributes.java @@ -0,0 +1,82 @@ +package fr.devinsy.xid; + +import java.util.*; + + + + +/** + * + * Note: no more AttrValue as in Brill, because the exception of style is managed + * in the attribute merging on the "style" string detection. + */ +public class Attributes extends HashMap +{ + private static final long serialVersionUID = 2802739066295665336L; + + + /* + * + */ + public Attributes () + { + super (); + } + + + /* + * Useful for the merge attributes. + */ + public Attributes (Attributes attributes) + { + super (attributes); + } + + + /* + * + */ + public void setAttribute (String label, String value) + { + this.put (label, value); + } + + + /* + * Add a value to an existing value. This is useful to the 'style' attribute. + * + */ + public void appendAttribute (String label, String value) + { + if (this.containsKey (label)) + { + this.put (label, this.get (label) + value); + } + else + { + this.put (label, value); + } + } + + + /* + * + */ + public String getAttribute (String label) + { + String result; + + if (this.containsKey (label)) + { + result = this.get (label); + } + else + { + result = null; + } + + // + return (result); + } + +} diff --git a/src/fr/devinsy/xid/Data.java b/src/fr/devinsy/xid/Data.java new file mode 100644 index 0000000..e20a4ba --- /dev/null +++ b/src/fr/devinsy/xid/Data.java @@ -0,0 +1,390 @@ +package fr.devinsy.xid; + + + +/* + * + */ +public class Data +{ + protected IdsDataById idsDataById; + protected TagsDataById tagsDataById; + + + /** + * + */ + public Data () + { + this.idsDataById = new IdsDataById (); + this.tagsDataById = new TagsDataById (); + } + + + /** + * + */ + public IdsDataById getIdsDataById () + { + IdsDataById result; + + result = this.idsDataById; + + // + return (result); + } + + + /** + * + */ + public TagsDataById getTagsDataById () + { + TagsDataById result; + + result = this.tagsDataById; + + // + return (result); + } + + + /** + * + */ + public IdData getIdData (String id) + { + IdData result; + + // Be sure that IdData is existing and get item. + result = (IdData) this.idsDataById.getId (id); + + if (result == null) + { + this.idsDataById.setId (id, new IdData ()); + + result = (IdData) this.idsDataById.getId (id); + } + + + // + return (result); + } + + + /** + * + */ + public IdData getIdData (String id, int line) + { + IdData result; + + // Be sure that IdsData are existing. + IdsDataByIndex tags = (IdsDataByIndex) this.idsDataById.getId (id); + if (tags == null) + { + this.idsDataById.setId (id, new IdsDataByIndex ()); + + tags = (IdsDataByIndex) this.idsDataById.getId (id); + } + + // Be sure that lines are existing. + int nbLines = tags.size (); + for (int nLine = nbLines; nLine < line + 1; nLine++) + { + tags.add (nLine, new IdData ()); + } + + // Get item. + result = (IdData) tags.elementAt (line); + + // + return (result); + } + + + /** + * + */ + public IdData getIdData (String id, int line, String column) + { + IdData result; + + // Be sure that IdsData are existing. + IdsDataByIndex tags = (IdsDataByIndex) this.idsDataById.getId (id); + if (tags == null) + { + this.idsDataById.setId (id, new IdsDataByIndex ()); + + tags = (IdsDataByIndex) this.idsDataById.getId (id); + } + + // Be sure that lines are existing. + int nbLines = tags.size (); + for (int nLine = nbLines; nLine < line + 1; nLine++) + { + tags.add (nLine, new IdsDataById ()); + } + + // Get item. + IdsDataById lineData = (IdsDataById) tags.elementAt (line); + + result = (IdData) lineData.get (column); + + if (result == null) + { + lineData.put (column, new IdData ()); + + result = (IdData) lineData.get (column); + } + + // + return (result); + } + + + /** + * + */ + public void setIterationStrategy (String id, IdData.IterationStrategy strategy) + { + IdData tag = (IdData) this.getIdData (id); + + tag.setIterationStrategy (strategy); + } + + + + /** + * + */ + public void setContent (String id, String content) + { + if (id.startsWith ("<")) + { + String tagName = id.substring (1, id.length () - 1); + + TagData tag = this.tagsDataById.getId (tagName); + if (tag == null) + { + tag = new TagData (); + this.tagsDataById.setId (tagName, tag); + } + + tag.setContent (content); + } + else + { + IdData idData = this.getIdData (id); + + idData.setContent (content); + } + } + + + /** + * + */ + public void setContent (String id, int content) + { + setContent (id, (new Integer (content)).toString ()); + } + + + /** + * + */ + public void setContent (String id, int line, String content) + { + IdData tag = this.getIdData (id, line); + + tag.setContent (content); + } + + + /** + * + */ + public void setContent (String id, int line, int content) + { + setContent (id, line, (new Integer (content)).toString ()); + } + + + /** + * + */ + public void setContent (String id, int line, String column, String content) + { + IdData tag = this.getIdData (id, line, column); + + tag.setContent (content); + } + + + /** + * + */ + public void setContent (String id, int line, String column, int content) + { + setContent (id, line, column, (new Integer (content)).toString ()); + } + + + /** + * @TODO + */ + public void setContent (String id, int line, String subId, int subLine, String column, String content) + { + // IdData tag = this.getIdData (id, line, subId, subLine, column); + + //tag.setContent (content); + } + + + /** + * + */ + public void setAttribute (String id, String label, String value) + { + if (id.startsWith ("<")) + { + String tagName = id.substring (1, id.length () - 1); + + TagData tag = this.tagsDataById.getId (tagName); + if (tag == null) + { + tag = new TagData (); + this.tagsDataById.setId (tagName, tag); + } + + tag.getAttributes ().setAttribute (label, value); + } + else + { + IdData tag = this.getIdData (id); + + tag.getAttributes ().setAttribute (label, value); + } + } + + + /** + * + */ + public void setAttribute (String id, String label, int value) + { + setAttribute (id, label, (new Integer (value)).toString ()); + } + + + /** + * + */ + public void setAttribute (String id, int line, String label, String value) + { + IdData tag = this.getIdData (id, line); + + tag.getAttributes ().setAttribute (label, value); + } + + + /** + * + */ + public void setAttribute (String id, int line, String label, int value) + { + setAttribute (id, line, label, (new Integer (value)).toString ()); + } + + + /** + * + */ + public void setAttribute (String id, int line, String column, String label, String value) + { + IdData tag = this.getIdData (id, line, column); + + tag.getAttributes ().setAttribute (label, value); + } + + + /** + * + */ + public void setAttribute (String id, int line, String column, String label, int value) + { + setAttribute (id, line, column, label, (new Integer (value)).toString ()); + } + + + /** + * + */ + public void appendAttribute (String id, int line, String column, String label, String value) + { + IdData tag = this.getIdData (id, line, column); + + tag.getAttributes ().appendAttribute (label, value); + } + + + /** + * + */ + public void appendAttribute (String id, String label, String value) + { + IdData tag = this.getIdData (id); + + tag.getAttributes ().appendAttribute (label, value); + } + + + /** + * + */ + public void appendAttribute (String id, String label, int value) + { + appendAttribute (id, label, (new Integer (value)).toString ()); + } + + + /** + * + */ + public void appendContent (String id, int line, String value) + { + IdData tag = this.getIdData (id, line); + + tag.appendContent (value); + } + + + /** + * + */ + public void appendContent (String id, int line, int value) + { + appendContent (id, line, (new Integer (value)).toString ()); + } + + + /** + * + */ + public void appendContent (String id, int line, String column, String value) + { + IdData tag = this.getIdData (id, line, column); + + tag.appendContent (value); + } + + + /** + * + */ + public void appendContent (String id, int line, String column, int value) + { + appendContent (id, line, column, (new Integer (value)).toString ()); + } +} diff --git a/src/fr/devinsy/xid/DomPresenter.java b/src/fr/devinsy/xid/DomPresenter.java new file mode 100644 index 0000000..e0f5e0c --- /dev/null +++ b/src/fr/devinsy/xid/DomPresenter.java @@ -0,0 +1,191 @@ +package fr.devinsy.xid; + +import org.w3c.dom.*; + +/** + * + */ +public class DomPresenter extends Presenter +{ + static final public char INDEX_SEPARATOR = '_'; + + static protected org.apache.log4j.Logger logger; + static + { + logger = org.apache.log4j.Logger.getLogger (DomPresenter.class); + } + + static protected String staticRootPath; + static + { + staticRootPath = null; + } + + + protected String webappPath; + protected Document doc; + + /* + * + */ + public DomPresenter () + { + this.webappPath = Presenter.staticRootPath; + this.doc = null; + } + + + /* + * + */ + public DomPresenter (Document doc) + { + this.webappPath = Presenter.staticRootPath; + this.doc = doc; + DomPresenter.addMetaTag (this.doc, "generator", "XID 0.0"); + } + + + /* + * + */ + public DomPresenter (String webappPath, Document doc) + { + if ((webappPath == null) || (webappPath.equals (""))) + { + this.webappPath = Presenter.staticRootPath; + } + else + { + this.webappPath = webappPath; + } + + this.doc = doc; + DomPresenter.addMetaTag (this.doc, "generator", "XID 0.0"); + } + + + /* + * + */ + public String getWebappPath () + { + String result; + + result = this.webappPath; + + // + return (result); + } + + /* + * + */ + public void setWebappPath (String path) + { + this.webappPath = path; + } + + + /** + * + */ + public Document getDom () + { + Document result; + + result = this.doc; + + // + return (result); + } + + + /** + * + */ + public void setDom (Document doc) + { + this.doc = doc; + } + + + /* + * + */ + public void setSource (Document doc) + { + this.doc = doc; + + Presenter.addMetaTag (this.doc, "generator", "XID 0.0"); + } + + + /* + * + */ + public Object getSource () + { + Object result; + + result = this.doc; + + // + return (result); + } + + + /* + * + */ + public StringBuffer doXid (Data datas, StringBuffer errorOutput) + { + return (doXid (datas.getIdsDataById (), datas.getTagsDataById (), errorOutput)); + } + + /* + * + */ + public StringBuffer doXid (IdsDataById datas, TagsDataById tagsData, StringBuffer errorOutput) + { + StringBuffer result; + + if (this.doc == null) + { + String errorMessage = "source not defined"; + errorOutput.append (errorMessage); + logger.error (errorMessage); + result = null; + } + else + { + // Build the web page. + result = Presenter.doXid (this.doc, datas, tagsData, this.webappPath, errorOutput); + } + + // + return (result); + } + + + /* + * Xid a file with data. + */ + static public StringBuffer doXid (Document doc, IdsDataById datas, String webappPath, StringBuffer errorOutput) + { + return (doXid (doc, datas, null, webappPath, errorOutput)); + } + + /* + * Xid a file with data. + */ + static public StringBuffer doXid (Document doc, IdsDataById datas, TagsDataById tagsData, String webappPath, StringBuffer errorOutput) + { + StringBuffer result; + + result = Presenter.process (doc, datas, tagsData, webappPath, errorOutput); + + // + return (result); + } +} diff --git a/src/fr/devinsy/xid/FilePresenter.java b/src/fr/devinsy/xid/FilePresenter.java new file mode 100644 index 0000000..bfbb82a --- /dev/null +++ b/src/fr/devinsy/xid/FilePresenter.java @@ -0,0 +1,167 @@ +package fr.devinsy.xid; + +import java.io.*; +import org.w3c.dom.*; + + +/** + * + */ +public class FilePresenter extends DomPresenter +{ + static protected org.apache.log4j.Logger logger; + static + { + logger = org.apache.log4j.Logger.getLogger (FilePresenter.class); + } + + protected String sourceFileName; + protected long sourceFileTime; + + /* + * + */ + public FilePresenter () + { + this.webappPath = Presenter.staticRootPath; + this.sourceFileName = null; + this.sourceFileTime = 0; + this.doc = null; + } + + + /* + * + */ + public FilePresenter (String fileName) + { + this.webappPath = Presenter.staticRootPath; + this.sourceFileName = fileName; + this.sourceFileTime = 0; + this.doc = null; + } + + + /* + * + */ + public FilePresenter (String webappPath, String fileName) + { + if ((webappPath == null) || (webappPath.equals (""))) + { + this.webappPath = Presenter.staticRootPath; + } + else + { + this.webappPath = webappPath; + } + this.sourceFileName = fileName; + this.sourceFileTime = 0; + this.doc = null; + } + + + /* + * + */ + public void setSource (String fileName) + { + this.sourceFileName = fileName; + this.sourceFileTime = 0; + this.doc = null; + } + + + /* + * + */ + public String getSource () + { + String result; + + result = this.sourceFileName; + + // + return (result); + } + + + /* + * + */ + public StringBuffer doXid (Data datas, StringBuffer errorOutput) + { + return (doXid (datas.getIdsDataById (), datas.getTagsDataById (), errorOutput)); + } + + + /* + * + */ + public StringBuffer doXid (IdsDataById datas, TagsDataById tagsData, StringBuffer errorOutput) + { + StringBuffer result; + + String sourceFilePath = this.webappPath + File.separator + this.sourceFileName; + + // Get the good tree. + File source = new File (sourceFilePath); + + if (source == null) + { + String errorMessage = "source file not defined"; + errorOutput.append (errorMessage); + logger.error (errorMessage); + result = null; + } + else if (!source.exists ()) + { + String errorMessage = "source file defined but not found (" + sourceFilePath + ")"; + errorOutput.append (errorMessage); + logger.error (errorMessage); + result = null; + } + else if ((this.doc == null) || + (this.sourceFileTime != source.lastModified ())) + { + this.sourceFileTime = source.lastModified (); + this.doc = Presenter.fileToTree (sourceFilePath, errorOutput); + + if (this.doc != null) + { + Presenter.addMetaTag (doc, "generator", "XID 0.0"); + } + } + + // Build the web page. + result = Presenter.doXid (doc, datas, tagsData, this.webappPath, errorOutput); + + // + return (result); + } + + + /* + * Xid a file without data. + */ + static public StringBuffer doXid (String fileName, String webappPath, StringBuffer errorOutput) + { + StringBuffer result; + + Document doc = Presenter.fileToTree (fileName, errorOutput); + + if (doc == null) + { + result = null; + } + else + { + Presenter.addMetaTag (doc, "generator", "XID 0.0"); + + result = Presenter.doXid (doc, null, null, webappPath, errorOutput); + } + + // + return (result); + } +} diff --git a/src/fr/devinsy/xid/IdData.java b/src/fr/devinsy/xid/IdData.java new file mode 100644 index 0000000..612119c --- /dev/null +++ b/src/fr/devinsy/xid/IdData.java @@ -0,0 +1,180 @@ +package fr.devinsy.xid; + +import java.io.*; + +/** + * IdData class is used to hold application data and + * the business logic that operates on the data. + * + * The only requirement of a IdData class is that it must implement a + * display method. The display method must return a text representation + * of the data, suitable for display in a web page. + * + * XID provides a User Input IdData, Text IdData and ... + * application may also implement it's own IdData classes. + * + */ +public class IdData implements Serializable, IdDataCore +{ + private static final long serialVersionUID = 8976245034682639923L; + + + public enum IterationStrategy {ONLY_FIRST_ROW, ONLY_FIRST_TWO_ROWS, ONLY_ROWS_WITH_ID, ONLY_ROWS_WITHOUT_ID, ALL_ROWS} + + + + + public enum MODE {REPLACE, APPEND, IGNORE}; + + protected IterationStrategy iterationStrategy; + protected Attributes attributes; + protected boolean excludeSection; + protected MODE displayMode = MODE.REPLACE; + protected String content; + + /* + * + */ + public IdData () + { + this.attributes = null; + this.excludeSection = false; + this.displayMode = MODE.REPLACE; + this.content = null; + this.iterationStrategy = IterationStrategy.ALL_ROWS; + } + + + /* + * + */ + public IdData (String text) + { + this.attributes = null; + this.excludeSection = false; + this.displayMode = MODE.REPLACE; + this.content = text; + this.iterationStrategy = IterationStrategy.ALL_ROWS; + } + + + /* + * + */ + public String display () + { + String result; + + result = this.content; + + // + return (result); + } + + + /* + * + */ + public void setContent (String text) + { + this.content = text; + } + + + /* + * + */ + public void appendContent (String text) + { + if (this.content == null) + { + this.content = text; + } + else + { + this.content += text; + } + } + + + /* + * + */ + public void setDisplayMode(MODE displayMode) + { + this.displayMode = displayMode; + } + + + /* + * + */ + public MODE getDisplayMode() + { + MODE result; + + result = this.displayMode; + + return (result); + } + + + /* + * + */ + public Attributes getAttributes () + { + Attributes result; + + if (this.attributes == null) + { + this.attributes = new Attributes (); + } + + result = this.attributes; + + // + return (result); + } + + + /* + * + */ + public void setExcludeSection(boolean excludeSection) + { + this.excludeSection = excludeSection; + } + + + /* + * + */ + public boolean getExcludeSection() + { + return excludeSection; + } + + + /** + * + */ + public void setIterationStrategy (IterationStrategy strategy) + { + this.iterationStrategy = strategy; + } + + + /** + * + */ + public IterationStrategy getIterationStrategy () + { + IterationStrategy result; + + result = this.iterationStrategy; + + // + return (result); + } +} diff --git a/src/fr/devinsy/xid/IdDataCore.java b/src/fr/devinsy/xid/IdDataCore.java new file mode 100644 index 0000000..3b87323 --- /dev/null +++ b/src/fr/devinsy/xid/IdDataCore.java @@ -0,0 +1,15 @@ +package fr.devinsy.xid; + +/* + * Xid uses three class to describe data: + * - TagData + * - TagsData + * - TagsDataById + * Others class that doesn't extends these won't be use by Xid. + * + * This interface helps to express this fact. + * + */ +public interface IdDataCore +{ +} diff --git a/src/fr/devinsy/xid/IdsDataById.java b/src/fr/devinsy/xid/IdsDataById.java new file mode 100644 index 0000000..e1ec7c4 --- /dev/null +++ b/src/fr/devinsy/xid/IdsDataById.java @@ -0,0 +1,42 @@ +package fr.devinsy.xid; + +import java.util.*; + +/* + * + */ +public class IdsDataById extends HashMap implements IdDataCore +{ + + private static final long serialVersionUID = -5787252043825503554L; + + /* + * + */ + public IdsDataById () + { + super (); + } + + /* + * + */ + public void setId (String id, IdDataCore data) + { + this.put (id, data); + } + + /* + * + */ + public IdDataCore getId (String id) + { + IdDataCore result; + + result = this.get (id); + + // + return (result); + } + +} diff --git a/src/fr/devinsy/xid/IdsDataByIndex.java b/src/fr/devinsy/xid/IdsDataByIndex.java new file mode 100644 index 0000000..c47e1b2 --- /dev/null +++ b/src/fr/devinsy/xid/IdsDataByIndex.java @@ -0,0 +1,21 @@ +package fr.devinsy.xid; + +import java.util.*; + + +/* + * + */ +public class IdsDataByIndex extends Vector implements IdDataCore +{ + + private static final long serialVersionUID = 215545720925753884L; + + /** + * + */ + public IdsDataByIndex () + { + super (); + } +} diff --git a/src/fr/devinsy/xid/ParserErrorHandler.java b/src/fr/devinsy/xid/ParserErrorHandler.java new file mode 100644 index 0000000..675def3 --- /dev/null +++ b/src/fr/devinsy/xid/ParserErrorHandler.java @@ -0,0 +1,159 @@ +package fr.devinsy.xid; + +import org.xml.sax.*; +import java.util.*; + +/** + * Extract from org.xml.sax Interface ErrorHandler: + * "If a SAX application needs to implement customized error handling, + * it must implement this interface and then register an instance with + * the XML reader using the setErrorHandler method. The parser will + * then report all errors and warnings through this interface." + * + */ +public class ParserErrorHandler implements ErrorHandler +{ + Vector messages; + int fatalErrorsCount; + int errorsCount; + int warningCount; + + public ParserErrorHandler () + { + fatalErrorsCount = 0; + errorsCount = 0; + warningCount = 0; + messages = new Vector (); + } + + + /** + * + */ + public int fatalErrorsCount () + { + int result; + + result = this.fatalErrorsCount; + + // + return (result); + } + + /** + * + */ + public int errorsCount () + { + int result; + + result = this.errorsCount; + + // + return (result); + } + + /** + * + */ + public int warningCount () + { + int result; + + result = this.warningCount; + + // + return (result); + } + + /** + * + */ + public int allErrorsCount () + { + int result; + + result = fatalErrorsCount () + errorsCount () + warningCount (); + + // + return (result); + } + + /** + * + */ + public boolean hasError () + { + boolean result; + + if (allErrorsCount () == 0) + { + result = false; + } + else + { + result = true; + } + + // + return (result); + } + + + /** + * Called by the XML parser to handle fatal errors. + * @param ex Parse Excpetion. Contains the warning text and the line number. + */ + public void error (SAXParseException exception) + { + String message = "Error at line " + exception.getLineNumber() + " : " + exception.getMessage(); + + this.errorsCount += 1; + this.messages.add (message); + } + + /** + * Called by the XML parser to handle fatal errors. + * @param ex Parse Excpetion. Contains the error text and the line number. + * When a fatal parse error occurs, the parse does not return a document. + */ + public void fatalError (SAXParseException exception) + { + String message = "Fatal error at line " + exception.getLineNumber() + " : " + exception.getMessage(); + + this.fatalErrorsCount += 1; + this.messages.add (message); + } + + /** + * Called by the XML parser to handle warnings. + * @param ex Parse Excpetion. Contains the warning text and the line number. + */ + public void warning(SAXParseException exception) + { + String message = "Warning at line " + exception.getLineNumber() + " : " + exception.getMessage(); + + this.warningCount += 1; + this.messages.add (message); + } + + + /** + * + */ + public String toString () + { + StringBuffer result; + + result = new StringBuffer (); + + for (String message : messages) + { + result.append (message); + result.append ('\n'); + } + + // + return (result.toString ()); + } +} diff --git a/src/fr/devinsy/xid/Presenter.java b/src/fr/devinsy/xid/Presenter.java new file mode 100644 index 0000000..ec828b0 --- /dev/null +++ b/src/fr/devinsy/xid/Presenter.java @@ -0,0 +1,1331 @@ +package fr.devinsy.xid; + +import java.util.*; +import java.io.*; +import javax.xml.parsers.*; +import javax.xml.validation.Schema; +import org.xml.sax.*; +import org.w3c.dom.*; + + +/** + * + */ +public class Presenter +{ + static final public char INDEX_SEPARATOR = '_'; + + static protected org.apache.log4j.Logger logger; + static + { + logger = org.apache.log4j.Logger.getLogger (Presenter.class); + } + + static protected String staticRootPath; + static + { + staticRootPath = null; + } + + + /* + * + */ + static public void setStaticRootPath (String path) + { + Presenter.staticRootPath = path; + } + + + /* + * + */ + static public String getStaticRootPath () + { + String result; + + result = Presenter.staticRootPath; + + // + return (result); + } + + /* + * Xid a file with data. + */ + static public StringBuffer doXid (Document doc, IdsDataById datas, String webappPath, StringBuffer errorOutput) + { + return (doXid (doc, datas, null, webappPath, errorOutput)); + } + + /* + * Xid a file with data. + */ + static public StringBuffer doXid (Document doc, IdsDataById datas, TagsDataById tagsData, String webappPath, StringBuffer errorOutput) + { + StringBuffer result; + + result = Presenter.process (doc, datas, tagsData, webappPath, errorOutput); + + // + return (result); + } + + + /* + * + */ + static public String getClassAttributeValue (Node node) + { + String result; + + NamedNodeMap attributes = node.getAttributes (); + if (attributes == null) + { + result = null; + } + else + { + Node nameAttribute = attributes.getNamedItem ("class"); + + if (nameAttribute == null) + { + result = null; + } + else + { + result = nameAttribute.getNodeValue (); + } + } + + // + return (result); + } + + + /** + * + */ + static public Attributes mergeAttributes (Attributes target, Attributes source) + { + Attributes result; + + // + if (target == null) + { + result = source; + } + else if (source == null) + { + result = target; + } + else + { + result = new Attributes (target); + + Iterator iterator = source.entrySet().iterator(); + + while (iterator.hasNext()) + { + Map.Entry attribute = (Map.Entry) iterator.next(); + + String currentValue = target.get (attribute.getKey ()); + + if (currentValue == null) + { + result.put (attribute.getKey (), attribute.getValue ()); + } + else if (attribute.getKey ().equals ("style")) + { + result.put (attribute.getKey (), currentValue + attribute.getValue ()); + } + else + { + result.put (attribute.getKey (), attribute.getValue ()); + } + } + } + + // + return (result); + } + + /* + * + */ + static protected StringBuffer processChildren (Node node, IdsDataById datas, TagsDataById tagsData, String webappPath, StringBuffer errorOutput) + { + StringBuffer result; + + result = processChildren (node, datas, tagsData, webappPath, "", errorOutput); + + // + return (result); + } + + + /* + * + */ + static protected StringBuffer processChildren (Node node, + IdsDataById datas, + TagsDataById tagsData, + String webappPath, + String suffix, + StringBuffer errorOutput) + { + StringBuffer result; + result = new StringBuffer (); + + // Get the iteration strategy. + IdData.IterationStrategy strategy; + + NamedNodeMap attributes = node.getAttributes (); + if (attributes == null) + { + strategy = IdData.IterationStrategy.ALL_ROWS; + } + else + { + Node id = attributes.getNamedItem ("id"); + + if (id == null) + { + strategy = IdData.IterationStrategy.ALL_ROWS; + } + else + { + IdDataCore dataCore = datas.getId (id.getNodeValue ()); + if (dataCore == null) + { + strategy = IdData.IterationStrategy.ALL_ROWS; + } + else if (dataCore instanceof IdData) + { + IdData data = (IdData) dataCore; + strategy = data.getIterationStrategy (); + } + else + { + strategy = IdData.IterationStrategy.ALL_ROWS; + } + } + } + + + // Iterate. + NodeList children = node.getChildNodes(); + int childrenCount = children.getLength (); + + switch (strategy) + { + case ONLY_FIRST_ROW: + int lineCounter = 0; + for (int childIndex = 0; childIndex < childrenCount; childIndex++) + { + if (children.item (childIndex).getNodeType () == Node.ELEMENT_NODE) + { + lineCounter += 1; + if (lineCounter == 1) + { + result.append (process (children.item (childIndex), datas, tagsData, webappPath, suffix, errorOutput)); + } + } + else + { + result.append (process (children.item (childIndex), datas, tagsData, webappPath, suffix, errorOutput)); + } + } + break; + + case ONLY_FIRST_TWO_ROWS: + lineCounter = 0; + for (int childIndex = 0; childIndex < childrenCount; childIndex++) + { + if (children.item (childIndex).getNodeType () == Node.ELEMENT_NODE) + { + lineCounter += 1; + + if ((lineCounter == 1) || (lineCounter == 2)) + { + result.append (process (children.item (childIndex), datas, tagsData, webappPath, suffix, errorOutput)); + } + } + else + { + result.append (process (children.item (childIndex), datas, tagsData, webappPath, suffix, errorOutput)); + } + } + break; + + case ONLY_ROWS_WITH_ID: + for (int childIndex = 0; childIndex < childrenCount; childIndex++) + { + if (children.item (childIndex).getNodeType () == Node.ELEMENT_NODE) + { + NamedNodeMap attrs2 = children.item (childIndex).getAttributes (); + + if ((attrs2 != null) && + (attrs2.getNamedItem ("id") != null)) + { + result.append (process (children.item (childIndex), datas, tagsData, webappPath, suffix, errorOutput)); + } + } + else + { + result.append (process (children.item (childIndex), datas, tagsData, webappPath, suffix, errorOutput)); + } + } + break; + + case ONLY_ROWS_WITHOUT_ID: + for (int childIndex = 0; childIndex < childrenCount; childIndex++) + { + if (children.item (childIndex).getNodeType () == Node.ELEMENT_NODE) + { + NamedNodeMap attrs2 = children.item (childIndex).getAttributes (); + if ((attrs2 == null) || + (attrs2.getNamedItem ("id") == null)) + { + result.append (process (children.item(childIndex), datas, tagsData, webappPath, suffix, errorOutput)); + } + } + else + { + result.append (process (children.item (childIndex), datas, tagsData, webappPath, suffix, errorOutput)); + } + } + break; + + case ALL_ROWS: + for (int childIndex = 0; childIndex < childrenCount; childIndex++) + { + result.append (process (children.item(childIndex), datas, tagsData, webappPath, suffix, errorOutput)); + } + break; + } + + // + return (result); + } + + + + /** + * Includes another file into the current page. + * + * @param node + * @param attrMap + * @param idAttr + */ + static protected StringBuffer processObjectTag (Node node, + NamedNodeMap attrMap, + Node idAttr, + IdsDataById datas, + TagsDataById tagsData, + String webappPath, + StringBuffer errorOutput) + { + StringBuffer result; + + result = new StringBuffer (); + + // Find codetype. + String codetype; + if (attrMap == null) + { + codetype = null; + } + else if (attrMap.getNamedItem ("codetype") == null) + { + codetype = null; + } + else + { + codetype = attrMap.getNamedItem ("codetype").getNodeValue (); + } + + // Check tag requirements. + if ((attrMap == null) || + (codetype == null) || + (!codetype.equals ("application/xid")) || + (attrMap.getNamedItem ("data") == null)) + { + // STU: do default action. + Presenter.processElementBasically (node, datas, tagsData, webappPath, errorOutput); + } + else + { + logger.debug ("object action"); + result.append (""); + + // Build the file name. + String htmlFileName = webappPath + attrMap.getNamedItem ("data").getNodeValue (); + + + // Load file in tree. + Document childDoc = null; + try + { + childDoc = fileToTree (htmlFileName, errorOutput); + } + catch (Exception ex) + { + errorOutput.append ("unable to build the file tree"); + logger.debug ("unable to build the file tree"); + } + + // Extract the 'body' section. + Node body = null; + try + { + NodeList nodes = childDoc.getElementsByTagName ("body"); + + if (nodes.getLength () == 0) + { + errorOutput.append ("no body tag in include html"); + logger.debug ("no body tag in include html"); + } + else + { + body = nodes.item(0); + } + } + catch (Exception e) + { + errorOutput.append ("error getting child"); + logger.debug ("error getting child"); + } + + // Process the body child as part of the primary tree. + if (body == null) + { + errorOutput.append ("xid object body empty."); + } + else + { + NodeList bodyChildren = body.getChildNodes (); + + if (bodyChildren != null) + { + int childCount = bodyChildren.getLength (); + for (int childCounter = 0; childCounter < childCount; childCounter++) + { + result.append (process (bodyChildren.item (childCounter), datas, tagsData, webappPath, errorOutput)); + } + } + } + + // + result.append (""); + } + logger.debug ("end of object action"); + // + return (result); + } + + + + /** + * Processes a node that has dynamic content. Calls the appropriate code + * generator method, depending on the tag. + * + * @param node + * Current node. + * @param attrs + * The tag attributes. + * @param idAttr + * The ID. + */ + static protected StringBuffer processElementWithId (Node node, + NamedNodeMap attrs, + Node idAttr, + IdsDataById datas, + String webappPath, + StringBuffer errorOutput) + + { + StringBuffer result; + + result = processElementWithId (node, attrs, idAttr, datas, null, "", webappPath, errorOutput); + + // + return (result); + } + + + /** + * Processes a node that has dynamic content. Calls the appropriate code + * generator method, depending on the tag. + * + * @param node + * Current node. + * @param attrs + * The tag attributes. + * @param idAttr + * The ID. + */ + static protected StringBuffer processElementWithId (Node node, + NamedNodeMap attrs, + Node idAttr, + IdsDataById datas, + TagsDataById tagsData, + String webappPath, + String suffix, + StringBuffer errorOutput) + { + StringBuffer result; + result = new StringBuffer (); + + String tag = node.getNodeName(); + + if (tag.equals ("object")) + { + result.append (processObjectTag (node, attrs, idAttr, datas, tagsData, webappPath, errorOutput)); + } + else + { + String idValue = idAttr.getNodeValue(); + + logger.debug ("tag=" + tag); + + // Get data of this id. + IdDataCore dataCore = datas.get (idAttr.getNodeValue ()); + + if (dataCore == null) + { + result.append (Presenter.processElementBasically (node, datas, tagsData, webappPath, suffix, errorOutput)); + } + else if (dataCore instanceof IdData) + { + IdData data = (IdData) dataCore; + + String theClass; + if (data == null) + { + theClass = null; + } + else + { + theClass = data.getAttributes ().getAttribute ("class"); + } + + if ((theClass == null) || + (!theClass.equals ("xid:nodisplay"))) + { + // Open the tag. + result.append ("<"); + result.append (node.getNodeName()); + + // Build attributes. + Attributes tagAttributes; + if (tagsData == null) + { + tagAttributes = null; + } + else + { + TagData tagData = tagsData.getId (node.getNodeName ()); + if (tagData == null) + { + tagAttributes = null; + } + else + { + tagAttributes = tagData.getAttributes (); + } + } + + result.append (processAttributes (attrs, data.getAttributes (), tagAttributes, suffix)); + + if ((node.getChildNodes () == null) && + ((data == null) || (data.display () == null))) + { + // Close the tag. + result.append (" />"); + } + else + { + result.append ('>'); + + // CHANGED, cpm: + + // Insert data. + if ((data == null) || + (data.display () == null)) + { + result.append (processChildren (node, datas, tagsData, webappPath, suffix, errorOutput)); + } + else + { + result.append (data.display ()); + } + + // Close the tag. + result.append ("'); + } + } + } + else if (dataCore instanceof IdsDataByIndex) + { + IdsDataByIndex tags = (IdsDataByIndex) dataCore; + + int nbLines = tags.size (); + for (int nLine = 0; nLine < nbLines; nLine++) + { + if (tags.elementAt (nLine) instanceof IdData) + { + IdData data = (IdData) tags.elementAt (nLine); + + // Open the tag. + result.append ("<"); + result.append (node.getNodeName()); + + // Build attributes. + Attributes tagAttributes; + if (tagsData == null) + { + tagAttributes = null; + } + else + { + TagData tagData = tagsData.getId (node.getNodeName ()); + if (tagData == null) + { + tagAttributes = null; + } + else + { + tagAttributes = tagData.getAttributes (); + } + } + + result.append (processAttributes (attrs, data.getAttributes (), tagAttributes, Integer.toString (nLine))); + + if ((node.getChildNodes () == null) && + ((data == null) || (data.display () == null))) + { + // Close the tag. + result.append (" />\n"); + } + else + { + result.append ('>'); + + + // CHANGED, cpm + + // Insert data. + if ((data == null) || (data.display () == null)) + { + result.append (processChildren (node, datas, tagsData, webappPath, suffix, errorOutput)); + } + else + { + result.append (data.display ()); + } + + // Close the tag. + result.append ("\n"); + } + } + else + { + // Manage a Hashmap. + IdsDataById data = (IdsDataById) tags.elementAt (nLine); + + result.append (Presenter.processElementWithId (node, attrs, idAttr, data, tagsData, webappPath, Integer.toString (nLine), errorOutput)); + result.append ('\n'); + } + } + } + else + { + logger.warn ("Unknow type of IdDataId"); + } + } + + // + logger.debug ("Exit"); + return (result); + } + + + + /** + * + */ + static protected StringBuffer process (Node node, IdsDataById datas, TagsDataById tagsData, String webappPath, StringBuffer errorOutput) + { + StringBuffer result; + + result = Presenter.process (node, datas, tagsData, webappPath, "", errorOutput); + + // + return (result); + } + + + /** + * Recursive method that processes a node and any child nodes. + * + */ + static protected StringBuffer process (Node node, IdsDataById datas, TagsDataById tagsData, String webappPath, String suffix, StringBuffer errorOutput) + { + logger.debug ("Enter"); + String TRANSITIONAL_DTD = "xhtml1-transitional.dtd"; + String TRANSITIONAL_DOCTYPE = "\n"; + + StringBuffer result; + result = new StringBuffer (); + + // Is there anything to do? + if (node != null) + { + logger.debug ("nodeName=" + node.getNodeName ()); + // Find the name attribute value. + String name; + name = getClassAttributeValue (node); + + if ((name == null) || + ((name != null) && + (!name.equals ("xid:nodisplay")))) + { + int type = node.getNodeType(); + switch (type) + { + case Node.DOCUMENT_NODE: + { + logger.debug ("case Node.DOCUMENT_NODE"); + DocumentType dt = ((Document) node).getDoctype(); + + if (dt != null) + { + String publicId = dt.getPublicId(); + String systemId = dt.getSystemId(); + + if (systemId.equals(TRANSITIONAL_DTD)) + { + result.append(TRANSITIONAL_DOCTYPE); + } + + // Log.write(Log.TRACE,"publicId = " + publicId); + // Log.write(Log.TRACE,"systemId = " + systemId); + } + + result.append (Presenter.process (((Document) node).getDocumentElement(), datas, tagsData, webappPath, suffix, errorOutput)); + + break; + } + + case Node.ELEMENT_NODE: + { + logger.debug ("case Node.ELEMENT_NODE"); + + NamedNodeMap attrs = node.getAttributes (); + Node idAttr = attrs.getNamedItem ("id"); + + if (idAttr != null) + { + result.append (Presenter.processElementWithId (node, + attrs, + idAttr, + datas, + tagsData, + webappPath, + suffix, + errorOutput)); + } + else + { + + String tag = node.getNodeName(); + + if (tag.equals ("object")) + { + result.append (processObjectTag (node, attrs, idAttr, datas, tagsData, webappPath, errorOutput)); + } + else + { + result.append (Presenter.processElementBasically (node, datas, tagsData, webappPath, suffix, errorOutput)); + } + } + + break; + } + + // handle entity reference nodes + case Node.ENTITY_REFERENCE_NODE: + { + logger.debug ("case Node.ENTITY_REFERENCE_NODE"); + + result.append ('&'); + result.append (node.getNodeName()); + result.append (';'); + break; + } + + // print cdata sections + case Node.CDATA_SECTION_NODE: + { + logger.debug ("case Node.CDATA_SECTION_NODE"); + + result.append (""); + + break; + } + + // print text + case Node.TEXT_NODE: + { + logger.debug ("case Node.TEXTE_NODE"); + result.append (restoreEntities (new StringBuffer(node.getNodeValue()))); + break; + } + + // print processing instruction + case Node.PROCESSING_INSTRUCTION_NODE: + { + logger.debug ("Node.PROCESSING_INSTRUCTION_NODE"); + + result.append (" 0)) + { + result.append (' '); + result.append (data); + } + result.append ("?>"); + break; + } + } + } + } + + // + //logger.info ("result=" + result); + logger.debug ("Exit"); + return (result); + } + + + /* + * + */ + static StringBuffer processElementBasically (Node node, IdsDataById datas, TagsDataById tagsData, String webappPath, StringBuffer errorOutput) + { + StringBuffer result; + + result = processElementBasically (node, datas, tagsData, webappPath, "", errorOutput); + + // + return (result); + } + + + /* + * + */ + static StringBuffer processElementBasically (Node node, IdsDataById datas, TagsDataById tagsData, String webappPath, String suffix, StringBuffer errorOutput) + { + StringBuffer result; + result = new StringBuffer (); + + // Open the tag. + result.append ('<'); + result.append (node.getNodeName()); + + // Build the tag attributes. + Attributes tagAttributes; + if (tagsData == null) + { + tagAttributes = null; + } + else + { + TagData tagData = tagsData.getId (node.getNodeName ()); + if (tagData == null) + { + tagAttributes = null; + } + else + { + tagAttributes = tagData.getAttributes (); + } + } + + result.append (processAttributes (node.getAttributes (), + tagAttributes, + null, + suffix)); + + // + if (node.getChildNodes () == null) + { + result.append(" />"); + } + else + { + result.append('>'); + + result.append (processChildren (node, datas, tagsData, webappPath, suffix, errorOutput)); + + result.append("'); + } + + + // + return (result); + } + + + + /* + * + */ + static protected Document buildTree (InputStream source, StringBuffer errorOutput) + { + Document result; + + try + { + // Create a DocumentBuilderFactory and configure it. + DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance (); + + // Set various configuration options. + dbf.setValidating (true); + dbf.setIgnoringComments (true); + dbf.setIgnoringElementContentWhitespace (false); + dbf.setCoalescing (false); + + // Keep entity references as they are. + dbf.setExpandEntityReferences(false); + + // Create a DocumentBuilder that satisfies the constraints + // specified by the DocumentBuilderFactory. + DocumentBuilder db = dbf.newDocumentBuilder (); + + ParserErrorHandler errorHandler; + errorHandler = new ParserErrorHandler(); + + // Set the error handler. + db.setErrorHandler (errorHandler); + + Schema schema = db.getSchema (); + logger.debug ("schema=" + schema); + + // Parse the input file. + result = db.parse (source); + + if (errorHandler.hasError ()) + { + errorOutput.append (errorHandler.toString ()); + } + else + { + DomPresenter.addMetaTag (result, "generator", "XID 0.0"); + } + } + catch (ParserConfigurationException exception) + { + String errorMessage = "Parser configuration exception: " + exception.getMessage (); + errorOutput.append (errorMessage); + logger.error (errorMessage); + result = null; + } + catch (SAXException exception) + { + String errorMessage = "Error during SAX parsing: " + exception.getMessage (); + errorOutput.append (errorMessage); + logger.error (errorMessage); + result = null; + } + catch (IOException exception) + { + String errorMessage = "IOError during parsing." + exception.getMessage (); + errorOutput.append (errorMessage); + logger.error (errorMessage); + result = null; + } + + // + return (result); + } + + + + + /* + * + */ + static protected void addMetaTag (Document doc, String name, String content) + { + // Find head tag. + + Node headNode = Presenter.findHeadNode (doc); + + Node metaNode = doc.createElement ("meta"); + + NamedNodeMap attrMap = metaNode.getAttributes(); + Node attrNode = doc.createAttribute("name"); + attrMap.setNamedItem(attrNode); + attrNode.setNodeValue(name); + + attrNode = doc.createAttribute("content"); + attrMap.setNamedItem(attrNode); + attrNode.setNodeValue(content); + headNode.insertBefore(metaNode, headNode.getFirstChild()); + } + + + /** + * Finds the node containing the <head> tag. + * + * @param node + * Document node. + * @return The head tag node + */ + static protected Node findHeadNode (Node node) + { + Node headNode = null; + + int type = node.getNodeType(); + switch (type) + { + // print document + case Node.DOCUMENT_NODE: + { + headNode = findHeadNode(((Document) node).getDocumentElement()); + break; + } + + case Node.ELEMENT_NODE: + { + String tag = node.getNodeName(); + + if ("head".equals(tag)) + { + headNode = node; + break; + } + + NodeList children = node.getChildNodes(); + int numChildren = 0; + + if (children != null) + numChildren = children.getLength(); + + for (int i = 0; i < numChildren; i++) + { + headNode = findHeadNode(children.item(i)); + if (headNode != null) + break; + } + break; + } + } + return headNode; + } + + + /** + * Any ampersand lt;, ampersand gt; and ampersand amp; sequences in text + * nodes get read in as symbols. This method converts them back to entities. + * + * @param s String that is to have the entities restored.. + * @return The processed string. + */ + static public String restoreEntities (StringBuffer s) + { + String result; + + if (s == null) + { + result = null; + } + else + { + StringBuffer str = new StringBuffer(); + + int len = (s != null) ? s.length() : 0; + for (int i = 0; i < len; i++) + { + char ch = s.charAt(i); + switch (ch) + { + case '<': + { + str.append("<"); + break; + } + + case '>': + { + str.append(">"); + break; + } + + case '&': + { + str.append("&"); + break; + } + + default: + { + str.append(ch); + } + } + } + result = str.toString (); + } + + + // + return (result); + } + + + /** + * Get the text for an element. Converts new lines to spaces. + * + * @param node + */ + static protected String getElementText (Node node) + { + String result; + result = ""; // Grrrr, Java ... + + NodeList children = node.getChildNodes(); + if (children == null) + { + result = ""; + } + else + { + boolean ended = false; + int childCounter = 0; + int childCount = children.getLength (); + while (!ended) + { + if (childCounter >= childCount) + { + ended = true; + result = ""; + } + else + { + Node child = children.item (childCounter); + if (child.getNodeType () == Node.TEXT_NODE) + { + result = newLinesToSpaces (child.getNodeValue ()); // STU (+=, newLines...) + ended = true; + } + else + { + childCounter += 1; + } + } + } + } + + // + return (result); + } + + + /** + * Converts New Line characters to spaces. This is used when for example + * the text in a div tag goes over serveral lines. + * + * @param text String + * @return String + */ + static protected String newLinesToSpaces (String text) + { + StringBuffer result = new StringBuffer (text); + + for (int i = 0; i < result.length(); i++) + { + if (result.charAt (i) == '\n') + { + result.setCharAt (i,' '); + } + } + + // + return (result.toString()); + } + + + /* + * + */ + static protected StringBuffer processAttributes (NamedNodeMap attrs, Attributes dataAttributes, Attributes namedDataAttributes, String suffix) + { + StringBuffer result; + + result = processAttributes (attrs, mergeAttributes (dataAttributes, namedDataAttributes), suffix); + + // + return (result); + } + + + /* + * + */ + static protected StringBuffer processAttributes (NamedNodeMap attrs, Attributes dataAttributes) + { + StringBuffer result; + + result = processAttributes (attrs, dataAttributes, ""); + + // + return (result); + } + + + /* + * + */ + static protected StringBuffer processAttributes (NamedNodeMap attrs) + { + StringBuffer result; + + result = processAttributes (attrs, null, null, ""); + + // + return (result); + } + + + /* + * + */ + static protected StringBuffer processAttributes (NamedNodeMap attrs, Attributes dataAttributes, String suffix) + { + StringBuffer result; + + result = new StringBuffer (); + + // Build the original attributes list. + HashMap mergedAttributes; + mergedAttributes = new HashMap (); + for (int attributeCounter = 0; attributeCounter < attrs.getLength(); attributeCounter++) + { + Attr attr = (Attr) attrs.item (attributeCounter); + mergedAttributes.put (attr.getNodeName(), attr.getNodeValue ()); + } + + + // Put model attributes in the merged attributes list. + if (dataAttributes != null) + { + Iterator iterator = dataAttributes.entrySet().iterator(); + + while (iterator.hasNext()) + { + Map.Entry attribute = (Map.Entry) iterator.next(); + + if (mergedAttributes.containsKey (attribute.getKey ())) + { + if (attribute.getKey ().equalsIgnoreCase ("style")) + { + mergedAttributes.put (attribute.getKey (), mergedAttributes.get (attribute.getKey ()) + attribute.getValue ()); + } + else + { + mergedAttributes.put (attribute.getKey (), attribute.getValue ()); + } + } + else + { + mergedAttributes.put (attribute.getKey (), attribute.getValue ()); + } + } + } + + // Display the attributes + Iterator iterator = mergedAttributes.entrySet().iterator(); + while (iterator.hasNext ()) + { + Map.Entry attribute = (Map.Entry) iterator.next(); + + if ((attribute.getKey ().equals ("id")) && (suffix.length () != 0)) + { + result.append(" " + attribute.getKey () + "=\"" + attribute.getValue () + Presenter.INDEX_SEPARATOR + suffix + "\""); + } + else + { + result.append(" " + attribute.getKey () + "=\"" + attribute.getValue ()+ "\""); + } + } + + // + return (result); + } + + + /* + * + */ + static public String extractBodyContent (StringBuffer data) + { + String result = null; + + // Extract the body content. + String dataLowerCase = data.toString ().toLowerCase (); + + int startBody = dataLowerCase.indexOf (""); + int endBody = dataLowerCase.indexOf (""); + + // Note: as failed search is improbable, no care about complexity + // in failed search case. + if ((startBody == -1) || (endBody == -1)) + { + result = null; + } + else + { + result = data.substring (startBody + 6, endBody).trim (); + } + + // + return (result); + } + + + /* + * Define in Presnter cause needs this possibility. + */ + static protected Document fileToTree (String fileName, StringBuffer errorOutput) + { + Document result; + + try + { + result = buildTree (new FileInputStream (new File (fileName)), errorOutput); + } + catch (IOException exception) + { + String errorMessage = "IOError during parsing." + exception.getMessage (); + errorOutput.append (errorMessage); + logger.error (errorMessage); + result = null; + } + + // + return (result); + } +} diff --git a/src/fr/devinsy/xid/StringPresenter.java b/src/fr/devinsy/xid/StringPresenter.java new file mode 100644 index 0000000..42ada00 --- /dev/null +++ b/src/fr/devinsy/xid/StringPresenter.java @@ -0,0 +1,195 @@ +package fr.devinsy.xid; + + +import java.io.*; + + +/** + * + */ +public class StringPresenter extends DomPresenter +{ + static protected org.apache.log4j.Logger logger; + static + { + logger = org.apache.log4j.Logger.getLogger (StringPresenter.class); + } + + protected String html; + + /* + * + */ + public StringPresenter () + { + super (); + this.webappPath = Presenter.staticRootPath; + this.doc = null; + this.html = null; + } + + + /* + * + */ + public StringPresenter (String html) + { + this.webappPath = Presenter.staticRootPath; + this.doc = null; + this.html = html; + } + + + /* + * + */ + public StringPresenter (String webappPath, String html) + { + if ((webappPath == null) || (webappPath.equals (""))) + { + this.webappPath = Presenter.staticRootPath; + } + else + { + this.webappPath = webappPath; + } + this.doc = null; + this.html = html; + } + + + /* + * + */ + public void setSource (String html) + { + this.html = html; + this.doc = null; + } + + + /* + * + */ + public String getSource () + { + String result; + + result = this.html; + + // + return (result); + } + + + /* + * + */ + public StringBuffer doXid (Data datas, StringBuffer errorOutput) + { + return (doXid (datas.getIdsDataById (), datas.getTagsDataById (), errorOutput)); + } + + /* + * + */ + public StringBuffer doXid (IdsDataById datas, TagsDataById tagsData, StringBuffer errorOutput) + { + StringBuffer result; + + if (this.doc == null) + { + // Build doc from this.html. + String htmlSource; + if ((this.html.startsWith ("")) || + (this.html.startsWith (""))) + { + htmlSource = html; + } + else + { + htmlSource = "\n" + html + ""; + } + + // StringBufferInputStream is deprecated so we use another solution. + // (see http://www.developpez.net/forums/archive/index.php/t-14101.html). + doc = buildTree (new ByteArrayInputStream (htmlSource.getBytes ()), errorOutput); + } + + StringBuffer htmlTarget; + htmlTarget = Presenter.doXid (doc, datas, tagsData, this.webappPath, errorOutput); + + if (htmlTarget == null) + { + result = null; + } + else if ((this.html.startsWith ("")) || + (this.html.startsWith (""))) + { + result = htmlTarget; + } + else + { + String bodyContent = extractBodyContent (htmlTarget); + + if (bodyContent == null) + { + result = null; + } + else + { + result = new StringBuffer (bodyContent); + } + } + + // + return (result); + } + + + /* + * + */ + static public StringBuffer doXid (String html, Data datas, StringBuffer errorOutput) + { + return (doXid (html, datas.getIdsDataById (), datas.getTagsDataById (), "", errorOutput)); + } + + + /* + * + */ + static public StringBuffer doXid (String html, Data datas, String webappPath, StringBuffer errorOutput) + { + return (doXid (html, datas.getIdsDataById (), datas.getTagsDataById (), webappPath, errorOutput)); + } + + + /* + * Xid a string with html in. + */ + static public StringBuffer doXid (String html, IdsDataById datas, String webappPath, StringBuffer errorOutput) + { + return (doXid (html, datas, null, webappPath, errorOutput)); + } + + + /* + * Xid a string with html in. + */ + static public StringBuffer doXid (String html, IdsDataById datas, TagsDataById tagsData, String webappPath, StringBuffer errorOutput) + { + StringBuffer result; + + StringPresenter presenter = new StringPresenter (webappPath, html); + + result = presenter.doXid (datas, tagsData, errorOutput); + + // + return (result); + } +} diff --git a/src/fr/devinsy/xid/TagData.java b/src/fr/devinsy/xid/TagData.java new file mode 100644 index 0000000..7a102b4 --- /dev/null +++ b/src/fr/devinsy/xid/TagData.java @@ -0,0 +1,39 @@ +package fr.devinsy.xid; + +import java.io.*; + + +/** + * IdData class is used to hold application data and + * the business logic that operates on the data. + * + * The only requirement of a IdData class is that it must implement a + * display method. The display method must return a text representation + * of the data, suitable for display in a web page. + * + * XID provides a User Input IdData, Text IdData and ... + * application may also implement it's own IdData classes. + * + */ +public class TagData extends IdData implements Serializable +{ + private static final long serialVersionUID = 2857526344702056757L; + + + /* + * + */ + public TagData () + { + super (); + } + + + /* + * + */ + public TagData (String text) + { + super (text); + } +} diff --git a/src/fr/devinsy/xid/TagsDataById.java b/src/fr/devinsy/xid/TagsDataById.java new file mode 100644 index 0000000..1d1b9c4 --- /dev/null +++ b/src/fr/devinsy/xid/TagsDataById.java @@ -0,0 +1,43 @@ +package fr.devinsy.xid; + +import java.util.*; + + +/* + * + */ +public class TagsDataById extends HashMap +{ + + private static final long serialVersionUID = 7818145931750600119L; + + /* + * + */ + public TagsDataById () + { + super (); + } + + /* + * + */ + public void setId (String id, TagData data) + { + this.put (id, data); + } + + /* + * + */ + public TagData getId (String id) + { + TagData result; + + result = this.get (id); + + // + return (result); + } + +} diff --git a/src/fr/devinsy/xid/testXid.html b/src/fr/devinsy/xid/testXid.html new file mode 100644 index 0000000..78a308e --- /dev/null +++ b/src/fr/devinsy/xid/testXid.html @@ -0,0 +1,79 @@ + + + + test + + + Test 01: No id attribute + XHTML: Hello world. + no Java code + Result: Hello world. + + Test 02: id attribute with empty model + XHTML: Hello world. + no Java code + Result: Hello world. + + + Test 03: model changing the text + XHTML: Hello world. + // Populate attributes of Test 03. + text = new TextModel (); + text.getAttributes ().appendAttribute ("style", "background: blue;"); + text.getAttributes ().appendAttribute ("style", "foreground: red;"); + text.getAttributes ().setAttribute ("class", "totoClass"); + text.setText ("mummy"); + datas.put ("test03", text); + Result: Hello world. + + + Test 04: model changing title + XHTML: Hello world. + // Populate attributes of Test 04. + text = new TextModel (); + text.getAttributes ().setAttribute ("title", "another title"); + datas.put ("test04", text); + Result: Hello world. + + + Test 05: model adding style attributes + XHTML: Hello world. + // Populate attributes of Test 05. + text = new TextModel (); + text.getAttributes ().appendAttribute ("style", "background: blue;"); + text.getAttributes ().appendAttribute ("style", "foreground: red;"); + text.getAttributes ().setAttribute ("class", "aClass"); + datas.put ("test05", text); + Result: Hello world. + + + Test 06: model appending style attributes + XHTML: Hello world. + // Populate attributes of Test 06. + text = new TextModel (); + text.getAttributes ().appendAttribute ("style", "foreground: red;"); + text.getAttributes ().setAttribute ("class", "aClass"); + datas.put ("test06", text); + Result: Hello world. + + + Test 07: image + XHTML: A picture pinguoin flottant. + // Populate attributes of Test 07. + text = new TextModel (); + text.getAttributes ().setAttribute ("width", "50%"); + datas.put ("test07", text); + Result: A picture pinguoin flottant. + + + Test 08: xhtml source contains no display order in a tag. + XHTML: Hello you there. + Result: Hello you there. + + + Test 09: dynamic addition of the nodisplay order. + XHTML: Hello you there. + Result: Hello you there. + + + \ No newline at end of file diff --git a/src/fr/devinsy/xid/testXid.t b/src/fr/devinsy/xid/testXid.t new file mode 100644 index 0000000..9037424 --- /dev/null +++ b/src/fr/devinsy/xid/testXid.t @@ -0,0 +1,69 @@ + + + + test + + + Test 01: No id attribute + XHTML: Hello world. + no Java code + Result: Hello world. + + Test 02: id attribute with empty model + XHTML: Hello world. + no Java code + Result: Hello world. + + + Test 03: model changing the text + XHTML: Hello world. + // Populate attributes of Test 03. + text = new TextModel (); + text.getAttributes ().appendAttribute ("style", "background: blue;"); + text.getAttributes ().appendAttribute ("style", "foreground: red;"); + text.getAttributes ().setAttribute ("class", "totoClass"); + text.setText ("mummy"); + datas.put ("test03", text); + Result: Hello world. + + + Test 04: model changing title + XHTML: Hello world. + // Populate attributes of Test 04. + text = new TextModel (); + text.getAttributes ().setAttribute ("title", "another title"); + datas.put ("test04", text); + Result: Hello world. + + + Test 05: model adding style attributes + XHTML: Hello world. + // Populate attributes of Test 05. + text = new TextModel (); + text.getAttributes ().appendAttribute ("style", "background: blue;"); + text.getAttributes ().appendAttribute ("style", "foreground: red;"); + text.getAttributes ().setAttribute ("class", "aClass"); + datas.put ("test05", text); + Result: Hello world. + + + Test 06: model appending style attributes + XHTML: Hello world. + // Populate attributes of Test 06. + text = new TextModel (); + text.getAttributes ().appendAttribute ("style", "foreground: red;"); + text.getAttributes ().setAttribute ("class", "aClass"); + datas.put ("test06", text); + Result: Hello world. + + + Test 07: image + XHTML: A picture pinguoin flottant. + // Populate attributes of Test 07. + text = new TextModel (); + text.getAttributes ().setAttribute ("width", "50%"); + datas.put ("test07", text); + Result: A picture pinguoin flottant. + + + \ No newline at end of file diff --git a/src/fr/devinsy/xid/xhtml-lat1.ent b/src/fr/devinsy/xid/xhtml-lat1.ent new file mode 100644 index 0000000..ffee223 --- /dev/null +++ b/src/fr/devinsy/xid/xhtml-lat1.ent @@ -0,0 +1,196 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/fr/devinsy/xid/xhtml-special.ent b/src/fr/devinsy/xid/xhtml-special.ent new file mode 100644 index 0000000..cead4e8 --- /dev/null +++ b/src/fr/devinsy/xid/xhtml-special.ent @@ -0,0 +1,82 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/fr/devinsy/xid/xhtml-symbol.ent b/src/fr/devinsy/xid/xhtml-symbol.ent new file mode 100644 index 0000000..63c2abf --- /dev/null +++ b/src/fr/devinsy/xid/xhtml-symbol.ent @@ -0,0 +1,237 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/fr/devinsy/xid/xhtml1-frameset.dtd b/src/fr/devinsy/xid/xhtml1-frameset.dtd new file mode 100644 index 0000000..1a00936 --- /dev/null +++ b/src/fr/devinsy/xid/xhtml1-frameset.dtd @@ -0,0 +1,1235 @@ + + + + + +%HTMLlat1; + + +%HTMLsymbol; + + +%HTMLspecial; + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/fr/devinsy/xid/xhtml1-transitional.dtd b/src/fr/devinsy/xid/xhtml1-transitional.dtd new file mode 100644 index 0000000..e22581b --- /dev/null +++ b/src/fr/devinsy/xid/xhtml1-transitional.dtd @@ -0,0 +1,1210 @@ + + + + + +%HTMLlat1; + + +%HTMLsymbol; + + +%HTMLspecial; + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/tests/XidTest.java b/tests/XidTest.java new file mode 100644 index 0000000..abab2c0 --- /dev/null +++ b/tests/XidTest.java @@ -0,0 +1,238 @@ +/** + * XidTest. + */ + + +import fr.devinsy.xid.*; + +/** + * + */ +class XidTest +{ + static private org.apache.log4j.Logger logger; + + static + { + // Initialize logger. + org.apache.log4j.Logger log = null; + + org.apache.log4j.BasicConfigurator.configure (); + + + log = org.apache.log4j.Logger.getRootLogger (); + //logger.setLevel (org.apache.log4j.Level.INFO); + logger.setLevel (org.apache.log4j.Level.INFO); + + logger.info ("Enter"); + + // + logger.info ("Set the log file format..."); + + + // log = org.apache.log4j.Category.getInstance(Application.class.getName()); + logger.info ("... done."); + + logger.debug ("Exit"); + log = org.apache.log4j.Logger.getLogger (XidTest.class.getName ()); + } + + + + /** + * + */ + public static String check (String title, StringBuffer source, String model) + { + String result; + + if (source.indexOf (model) == -1) + { + result = String.format ("%-40s -> KO <-", title) + "\nGet:\n" + source + "\nWaiting:\n" + model; + + } + else + { + result = String.format ("%-40s [ OK ] ", title); + } + + + // + return (result); + } + + public enum MONTHS {JANUARY, FEBRUARY, MARCH, APRIL, MAY, JUNE, JULY, AUGUST, SEPTEMBER, OCTOBER, NOVEMBRE, DECEMBRE}; + + /** + * + */ + public static void main(String[] args) + { + System.out.println("Automatic test action for Xid!"); + + + Data datas; + IdData tag; + + + String htmlSource; + StringBuffer html; + StringBuffer errorMessage; + + // Populate attributes of Test 03. + System.out.println ("----------------------------"); + datas = new Data (); + datas.setContent ("name", "Superman"); + errorMessage = new StringBuffer (); + + html = StringPresenter.doXid ("
a name
", datas, errorMessage); + + System.out.println (check ("only content change", html, "
Superman
")); + + + // Populate attributes of Test 03. + System.out.println ("----------------------------"); + datas = new Data (); + datas.setContent ("lastname", "Spiderman"); + datas.appendAttribute ("lastname", "style", "background: blue;"); + datas.appendAttribute ("lastname", "style", "foreground: red;"); + datas.setAttribute ("lastname", "class", "nameClass"); + + errorMessage = new StringBuffer (); + html = StringPresenter.doXid ("
a last name
", datas, errorMessage); + System.out.println (check ("content and attributes", html, "
Spiderman
")); + + // Populate attributes of Test 03. + System.out.println ("----------------------------"); + datas = new Data (); + datas.setContent ("words", 0, "alpha"); + datas.setContent ("words", 1, "bravo"); + datas.setContent ("words", 2, "charlie"); + datas.setContent ("words", 3, "delta"); + datas.setContent ("words", 4, "echo"); + datas.setContent ("words", 5, "fox"); + + + errorMessage = new StringBuffer (); + html = StringPresenter.doXid ("
    \n
  • a word
  • \n
", datas, errorMessage); + + System.out.println (check ("list assertion 1", html, "
  • alpha
  • ")); + System.out.println (check ("list assertion 2", html, "
  • bravo
  • ")); + System.out.println (check ("list assertion 3", html, "
  • charlie
  • ")); + System.out.println (check ("list assertion 4", html, "
  • delta
  • ")); + System.out.println (check ("list assertion 5", html, "
  • echo
  • ")); + System.out.println (check ("list assertion 6", html, "
  • fox
  • ")); + + // Populate attributes of Test 03. + System.out.println ("----------------------------"); + datas = new Data (); + datas.setContent ("identity", 0, "nom", "Jemba"); + datas.setContent ("identity", 0, "prenom", "Epo"); + datas.setContent ("identity", 1, "nom", "Momon"); + datas.setContent ("identity", 1, "prenom", "Christian"); + datas.setContent ("identity", 2, "nom", "Tronche"); + datas.setContent ("identity", 2, "prenom", "Christophe"); + + + errorMessage = new StringBuffer (); + StringBuffer source = new StringBuffer (); + source.append ("\n"); + source.append (" \n"); + source.append ("
    noidun nomun prenom
    "); + htmlSource = source.toString (); + html = StringPresenter.doXid (htmlSource, datas, errorMessage); + + System.out.println (check ("table 1 assertion 1", html, "noidJembaEpo")); + System.out.println (check ("table 1 assertion 2", html, "noidMomonChristian")); + System.out.println (check ("table 1 assertion 3", html, "noidTroncheChristophe")); + + /* + // Populate attributes of Test 03. + System.out.println ("----------------------------"); + datas = new Data (); + datas.setContent ("identity", 0, "nom", "Jemba"); + datas.setContent ("identity", 0, "prenom", "Epo"); + datas.setContent ("identity", 1, "nom", "Momon"); + datas.setContent ("identity", 1, "prenom", "Christian"); + datas.setContent ("identity", 2, "nom", "Tronche"); + datas.setContent ("identity", 2, "prenom", "Christophe"); + datas.setIterationStrategy ("identity", IdsDataByIndex.IterationStrategy.ONLY_FIRST_ROW); + //datas.setIterationStrategy ("identity", IdsDataByIndex.IterationStrategy.ONLY_ROWS_WITH_ID); + //datas.setIterationStrategy ("identity", IdsDataByIndex.IterationStrategy.ONLY_ROWS_WITHOUT_ID); + //datas.setIterationStrategy ("identity", IdsDataByIndex.IterationStrategy.ALL_ROWS); + + + errorMessage = new StringBuffer (); + source = new StringBuffer (); + source.append ("\n"); + source.append (" \n"); + source.append (" \n"); + source.append (" \n"); + source.append ("
    noidun nomun prenom
    noidun nomun prenom
    noidun nomun prenom
    "); + htmlSource = source.toString (); + + System.out.println ("datas = new Data ();"); + System.out.println ("datas.setContent (\"identity\", 0, \"nom\", \"Jemba\");"); + System.out.println ("datas.setContent (\"identity\", 0, \"prenom\", \"Epo\");"); + System.out.println ("datas.setContent (\"identity\", 1, \"nom\", \"Momon\");"); + System.out.println ("datas.setContent (\"identity\", 1, \"prenom\", \"Christian\");"); + System.out.println ("datas.setContent (\"identity\", 2, \"nom\", \"Tronche\");"); + System.out.println ("datas.setContent (\"identity\", 2, \"prenom\", \"Christophe\");"); + + System.out.println ("+"); + System.out.println (htmlSource); + System.out.println ("=>"); + + + datas.setIterationStrategy ("identity", IdsDataByIndex.IterationStrategy.ONLY_FIRST_ROW); + System.out.println ("ONLY_FIRST_ROW:"); + html = Presenter.doXid (htmlSource, datas, "", errorMessage); + System.out.println (html); + + datas.setIterationStrategy ("identity", IdsDataByIndex.IterationStrategy.ONLY_ROWS_WITH_ID); + System.out.println ("ONLY_ROWS_WITH_ID:"); + html = Presenter.doXid (htmlSource, datas, "", errorMessage); + System.out.println (html); + + datas.setIterationStrategy ("identity", IdsDataByIndex.IterationStrategy.ONLY_ROWS_WITHOUT_ID); + System.out.println ("ONLY_ROWS_WITHOUT_ID:"); + html = Presenter.doXid (htmlSource, datas, "", errorMessage); + System.out.println (html); + + datas.setIterationStrategy ("identity", IdsDataByIndex.IterationStrategy.ALL_ROWS); + System.out.println ("ALL_ROWS:"); + html = Presenter.doXid (htmlSource, datas, "", errorMessage); + System.out.println (html); + + + + // Populate attributes of Test 03. + System.out.println ("----------------------------"); + datas = new Data (); + datas.setAttribute ("
    ", "class", "aDivClass"); + datas.setAttribute ("
    ", "style", "background-color: #000000;"); + datas.setAttribute ("number", "style", "background-color: #0000FF;"); + + errorMessage = new StringBuffer (); + source = new StringBuffer (); + source.append ("
    \n"); + source.append ("

    one

    \n"); + source.append ("
    \n"); + source.append ("
    \n"); + source.append ("

    three

    \n"); + source.append ("
    "); + htmlSource = source.toString (); + html = Presenter.doXid (htmlSource, datas, "", errorMessage); + + System.out.println (htmlSource); + System.out.println ("+"); + System.out.println ("datas = new Data ();"); + System.out.println ("datas.setAttribute (\"
    \", \"class\", \"aDivClass\");"); + System.out.println ("datas.setAttribute (\"
    \", \"style\", \"background-color: #000000;\");"); + System.out.println ("datas.setAttribute (\"number\", \"style\", \"background-color: #0000FF;\");"); + + System.out.println ("=>"); + System.out.println (html); + */ + } +} diff --git a/webapp-examples/META-INF/MANIFEST.MF b/webapp-examples/META-INF/MANIFEST.MF new file mode 100644 index 0000000..5e94951 --- /dev/null +++ b/webapp-examples/META-INF/MANIFEST.MF @@ -0,0 +1,3 @@ +Manifest-Version: 1.0 +Class-Path: +