2004-09-01 Gonzalo Paniagua Javier <gonzalo@ximian.com>
authorGonzalo Paniagua Javier <gonzalo.mono@gmail.com>
Wed, 1 Sep 2004 19:57:16 +0000 (19:57 -0000)
committerGonzalo Paniagua Javier <gonzalo.mono@gmail.com>
Wed, 1 Sep 2004 19:57:16 +0000 (19:57 -0000)
* AspGenerator.cs: handle builders that need to process inner text
with tags.

* Location.cs: added setters for the properties.

svn path=/branches/mono-1-0/mcs/; revision=33176

mcs/class/System.Web/System.Web.Compilation/AspGenerator.cs
mcs/class/System.Web/System.Web.Compilation/ChangeLog
mcs/class/System.Web/System.Web.Compilation/Location.cs

index 9e53465f583671821280e75fbac2cff3fd6b308b..a24439fc10b4d44bc88c1eceefa0a6f29b4d0bc9 100644 (file)
@@ -49,7 +49,7 @@ namespace System.Web.Compilation
                        this.Location = location;
                }
        }
-       
+
        class BuilderLocationStack : Stack
        {
                public override void Push (object o)
@@ -138,6 +138,7 @@ namespace System.Web.Compilation
                bool inScript, javascript;
                ILocation location;
                bool isApplication;
+               StringBuilder tagInnerText = new StringBuilder ();
                static Hashtable emptyHash = new Hashtable ();
 
                public AspGenerator (TemplateParser tparser)
@@ -367,7 +368,11 @@ namespace System.Web.Compilation
                        if (tparser.DefaultDirectiveName == "application" && t.Trim () != "")
                                throw new ParseException (location, "Content not valid for application file.");
 
-                       stack.Builder.AppendLiteralString (t);
+                       ControlBuilder current = stack.Builder;
+                       current.AppendLiteralString (t);
+                       if (current.NeedsTagInnerText ()) {
+                               tagInnerText.Append (t);
+                       }
                }
 
                bool ProcessTag (string tagid, TagAttributes atts, TagType tagtype)
@@ -493,6 +498,16 @@ namespace System.Web.Compilation
 
                        // if (current is TemplateBuilder)
                        //      pop from the id list
+                       if (current.NeedsTagInnerText ()) {
+                               try { 
+                                       current.SetTagInnerText (tagInnerText.ToString ());
+                               } catch (Exception e) {
+                                       throw new ParseException (current.location, e.Message, e);
+                               }
+
+                               tagInnerText.Length = 0;
+                       }
+
                        current.CloseControl ();
                        stack.Pop ();
                        stack.Builder.AppendSubBuilder (current);
index 80ce845933155876275450527a64e59aec1dc952..14c6da1991ed9a5579bda29c36b6655120de5441 100644 (file)
@@ -1,3 +1,10 @@
+2004-09-01 Gonzalo Paniagua Javier <gonzalo@ximian.com>
+
+       * AspGenerator.cs: handle builders that need to process inner text
+       with tags.
+
+       * Location.cs: added setters for the properties.
+
 2004-07-21 Gonzalo Paniagua Javier <gonzalo@ximian.com>
 
        * AspGenerator.cs: the path for file was treated as virtual, but it's
index e4a0cb775a10f2b0b8842f748a658abde7ba91ce..4a57b8055ac3fe350f9cbca3a323142d4dd5c922 100644 (file)
@@ -65,22 +65,27 @@ namespace System.Web.Compilation
 
                public int BeginLine {
                        get { return beginLine; }
+                       set { beginLine = value; }
                }
 
                public int EndLine {
                        get { return endLine; }
+                       set { endLine = value; }
                }
 
                public int BeginColumn {
                        get { return beginColumn; }
+                       set { beginColumn = value; }
                }
 
                public int EndColumn {
                        get { return endColumn; }
+                       set { endColumn = value; }
                }
 
                public string PlainText {
                        get { return plainText; }
+                       set { plainText = value; }
                }
        }
 }