diff options
author | Gonzalo Paniagua Javier <gonzalo.mono@gmail.com> | 2004-09-01 23:51:27 +0400 |
---|---|---|
committer | Gonzalo Paniagua Javier <gonzalo.mono@gmail.com> | 2004-09-01 23:51:27 +0400 |
commit | a4c94a25d260af14410c46d87f9fefbacb803673 (patch) | |
tree | f39fe408d01d9460077e7bff04e1efaab77dd9d6 /mcs/class/System.Web | |
parent | ad1b8f61ce1802cb2d80afe156c49296ccb0d490 (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=/trunk/mcs/; revision=33174
Diffstat (limited to 'mcs/class/System.Web')
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 ad15a2e342a..abcbac5f808 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-08-02 Duncan Mak <duncan@ximian.com> * BuildProviderResultFlags.cs: 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; } } } } |