Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/mono.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGonzalo Paniagua Javier <gonzalo.mono@gmail.com>2004-09-01 23:57:16 +0400
committerGonzalo Paniagua Javier <gonzalo.mono@gmail.com>2004-09-01 23:57:16 +0400
commit493013aecdb7ed04d9262da4dd62b8ca3776b430 (patch)
treef80e3b33f442f810ff1825a59219b10a3ea551e0 /mcs/class/System.Web
parent04e11c49cc4b77838094f3c4dded5e90f16fae73 (diff)
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. svn path=/branches/mono-1-0/mcs/; revision=33176
Diffstat (limited to 'mcs/class/System.Web')
-rw-r--r--mcs/class/System.Web/System.Web.Compilation/AspGenerator.cs19
-rw-r--r--mcs/class/System.Web/System.Web.Compilation/ChangeLog7
-rw-r--r--mcs/class/System.Web/System.Web.Compilation/Location.cs5
3 files changed, 29 insertions, 2 deletions
diff --git a/mcs/class/System.Web/System.Web.Compilation/AspGenerator.cs b/mcs/class/System.Web/System.Web.Compilation/AspGenerator.cs
index 9e53465f583..a24439fc10b 100644
--- a/mcs/class/System.Web/System.Web.Compilation/AspGenerator.cs
+++ b/mcs/class/System.Web/System.Web.Compilation/AspGenerator.cs
@@ -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);
diff --git a/mcs/class/System.Web/System.Web.Compilation/ChangeLog b/mcs/class/System.Web/System.Web.Compilation/ChangeLog
index 80ce8459331..14c6da1991e 100644
--- a/mcs/class/System.Web/System.Web.Compilation/ChangeLog
+++ b/mcs/class/System.Web/System.Web.Compilation/ChangeLog
@@ -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
diff --git a/mcs/class/System.Web/System.Web.Compilation/Location.cs b/mcs/class/System.Web/System.Web.Compilation/Location.cs
index e4a0cb775a1..4a57b8055ac 100644
--- a/mcs/class/System.Web/System.Web.Compilation/Location.cs
+++ b/mcs/class/System.Web/System.Web.Compilation/Location.cs
@@ -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; }
}
}
}