- About Scala
- Documentation
- Code Examples
- Software
- Scala Developers
[scala-bts] #2735: Preserve attribute order && Keep Tags minimized
Mon, 2009-11-30, 11:59
-------------------------------------------+--------------------------------
Reporter: behlma | Owner: scala-xml_team
Type: enhancement | Status: new
Priority: normal | Component: XML support
Keywords: XML, attribute, tag, minimized |
-------------------------------------------+--------------------------------
I have to automatically create a lot of JNDI environment variables like
the following:
Now no matter what I do, Scala will always put the "name" attribute last,
i.e. change attribute ordering and also expand my empty tag. I searched
the mailing list for a solution to the expanding problem, but in Snapshot
2.8.0 there doesn't seem to be an easy one. The end result is this:
Now I'd love to have the attribute order preserved, as scanning variables
(with my human eyes :) ) by the "name" attribute in a jndi config file is
a very common thing to do. I can live with the tag expansion, even though
it adds a bit of bloat and wonder why Scala expands my empty tag in the
first place: I would write down the expanded version if I wanted to.
Thanks guys!
Wed, 2009-12-09, 19:07
#2
Re: [scala-bts] #2735: Preserve attribute order && Keep Tags mi
On 09-12-08 01:25 PM, Anthony B. Coates (Londata) wrote:
> As regards implementing empty elements rather than full open/close
> tags, I have a 5-line modification that does this when using
> PrettyPrinter. What's the right process to contribute something like
> that?
Please attach a patch (preferably with test cases! :) to the ticket, I
think that's the best first step.
-0xe1a
Wed, 2009-12-09, 22:27
#3
Re: [scala-bts] #2735: Preserve attribute order && Keep Tags mi
Test cases! Glad you mentioned them. I hadn't written any yet because I
wanted first to find out what the usual build/test process and environment
are, and to make sure that I had all existing tests working correctly. Is
there some documentation available about how to get that kind of
environment set up?
Thanks a lot in advance,
Cheers, Tony.
On Wed, 09 Dec 2009 17:59:17 -0000, Alex Cruise wrote:
> On 09-12-08 01:25 PM, Anthony B. Coates (Londata) wrote:
>> As regards implementing empty elements rather than full open/close
>> tags, I have a 5-line modification that does this when using
>> PrettyPrinter. What's the right process to contribute something like
>> that?
>
> Please attach a patch (preferably with test cases! :) to the ticket, I
> think that's the best first step.
>
> -0xe1a
Mon, 2010-12-13, 19:47
#4
Re: [scala-bts] #2735: Preserve attribute order && Keep Tags min
-------------------------------------------+--------------------------------
Reporter: behlma | Owner: scala-xml_team
Type: enhancement | Status: new
Priority: normal | Component: XML support
Keywords: XML, attribute, tag, minimized |
-------------------------------------------+--------------------------------
Changes (by dcsobral):
* cc: dcsobral@… (added)
Tue, 2010-12-14, 14:17
#5
Re: [scala-bts] #2735: Preserve attribute order && Keep Tags min
-------------------------------------------+--------------------------------
Reporter: behlma | Owner: scala-xml_team
Type: enhancement | Status: new
Priority: normal | Component: XML support
Keywords: XML, attribute, tag, minimized |
-------------------------------------------+--------------------------------
Changes (by bethard):
* cc: steven.bethard@… (added)
Tue, 2010-12-14, 23:37
#6
Re: [scala-bts] #2735: Preserve attribute order && Keep Tags min
-------------------------------------------+--------------------------------
Reporter: behlma | Owner: scala-xml_team
Type: enhancement | Status: new
Priority: normal | Component: XML support
Keywords: XML, attribute, tag, minimized |
-------------------------------------------+--------------------------------
Changes (by mgd):
* cc: mgd@… (added)
Wed, 2010-12-15, 11:57
#7
Re: [scala-bts] #2735: Preserve attribute order && Keep Tags min
-------------------------------------------+--------------------------------
Reporter: behlma | Owner: scala-xml_team
Type: enhancement | Status: new
Priority: normal | Component: XML support
Keywords: XML, attribute, tag, minimized |
-------------------------------------------+--------------------------------
Comment(by bethard):
I just found a particularly nasty example of where not keeping tags
minimized causes real problems. If I insert a "
" element in a HTML page, Scala expands that to "
" which is interpreted as two line breaks, not one, in both Firefox and Chrome.
" element in a HTML page, Scala expands that to "
" which is interpreted as two line breaks, not one, in both Firefox and Chrome.
As regards implementing empty elements rather than full open/close tags, I
have a 5-line modification that does this when using PrettyPrinter.
What's the right process to contribute something like that? Thanks,
Cheers, Tony.
On Mon, 30 Nov 2009 10:59:31 -0000, Scala wrote:
> #2735: Preserve attribute order && Keep Tags minimized
> -------------------------------------------+--------------------------------
> Reporter: behlma | Owner: scala-xml_team
> Type: enhancement | Status: new
> Priority: normal | Component: XML support
> Keywords: XML, attribute, tag, minimized |
> -------------------------------------------+--------------------------------
> I have to automatically create a lot of JNDI environment variables like
> the following:
>
> override="false" />
>
> Now no matter what I do, Scala will always put the "name" attribute
> last,
> i.e. change attribute ordering and also expand my empty tag. I searched
> the mailing list for a solution to the expanding problem, but in
> Snapshot
> 2.8.0 there doesn't seem to be an easy one. The end result is this:
>
> name={key}>
>
> Now I'd love to have the attribute order preserved, as scanning
> variables
> (with my human eyes :) ) by the "name" attribute in a jndi config file
> is
> a very common thing to do. I can live with the tag expansion, even
> though
> it adds a bit of bloat and wonder why Scala expands my empty tag in the
> first place: I would write down the expanded version if I wanted to.
>
> Thanks guys!
>