[great-users] RE: [udm-users] newlines

Matthew J. Emerson mjemerson at isis.vanderbilt.edu
Fri Dec 10 13:34:19 CST 2004



It seems that I actually hit on a small bug in GME.  Usually '\n' in a
text string is enough to signal a line termination to GME, but in the
case of registry entry values, GME requires "\r\n" (carriage return +
newline).  I think Peter's going to change this in the future so that
'\n' is sufficient for registry entry values.

Thanks to everyone who helped me pin this down.

--Matt

-----Original Message-----
From: Endre Magyari 
Sent: Thursday, December 09, 2004 6:53 PM
To: udm-users
Subject: Re: [great-users] RE: [udm-users] newlines


I have finished implementing this on 11/09, so it should be working fine

with that release.

The following XML is a UDM output:
<!DOCTYPE Root SYSTEM "text_attr.dtd">

<Root>
	<cn>
		<AClass>
			<value2>
				a_value2
			</value2>
			<value1>
				a_value1
			</value1>
		</AClass>
		<BClass/>
		<CClass>
			<value>
				c_value
			</value>
		</CClass>
		<value1>
			hello123
		</value1>
		<value>
			hello
again!
		</value>
	</cn>
</Root>


You can see the newline character in "hello \n again"

Endre.


On Thu, 9 Dec 2004 16:55:41 -0600, Matthew J. Emerson  
<mjemerson at isis.vanderbilt.edu> wrote:

> Is this feature already implemented?  I can currently create
Text-typed
> attributes with no problem, but they don't display the
> whitespace-preserving behavior.  I'm using a release that was built on
> December 7.
>
> --Matt
>
> -----Original Message-----
> From: Endre Magyari
> Sent: Thursday, December 09, 2004 4:08 AM
> To: udm-users
> Subject: Re: [great-users] RE: [udm-users] newlines
>
>
> Adi,
>
> 	In UDM there is a new attribute type called "Text".
> 	This gets persisted as XML Text Node, and any white space
> character is
> preserved.
> 	Where this is needed, please use attributes of typ e "Text"
>
> Thanks,
> Endre
>
>
> On Wed, 8 Dec 2004 16:38:02 -0500, Aditya Agrawal <aagrawa at us.ibm.com>
> wrote:
>
>> Endre,
>>
>> How difficult will it be to write a parser that parses strings and
>> converts newline and other escape characters to some escape sequence?
> and
>> then when reading the string converts it back to the correct
>> representation?
>>
>> Thanks,
>> Adi
>>
>> -----------------------------------
>> Aditya Agrawal
>> Researcher
>> IBM T. J. Watson
>> mailto:aagrawa at us.ibm.com
>> +1 (914) 784-6068 (TL 863)
>>
>>
>> great-users-bounces at list.isis.vanderbilt.edu wrote on 12/08/2004
> 02:15:53
>> PM:
>>
>>> Matt,
>>>
>>> Right now, the code generator doesn?t support the usage of global
>>> objects and Attila are working on that.
>>>
>>> Thanks,
>>> Feng
>>>
>>> -----Original Message-----
>>> From: Matthew J. Emerson
>>> Sent: Tuesday, December 07, 2004 10:20 PM
>>> To: udm-users; great-users
>>> Subject: [great-users] RE: [udm-users] newlines
>>>
>>> > I think that's because you use DOM backend, and Xerces removes
>> thenewlines..
>>>
>>>
>>> I guess I should shift this over to the GReAT mailing list then.
>>>
>>> Is there a way to use something besides the DOM backend for a GReAT
>>> transformation, in the interest of preserving the newlines?  The
>>> formatting of these attribute values is important in my
> transformation.
>>>
>>> --Matt
>>>
>>> -----Original Message-----
>>> From: Attila Vizhanyo
>>> Sent: Tuesday, December 07, 2004 7:45 PM
>>> To: udm-users
>>> Subject: RE: [udm-users] newlines
>>>
>>> I think that's because you use DOM backend, and Xerces removes the
>> newlines..
>>>
>>> HTH,
>>> Attila
>>>
>>> -----Original Message-----
>>> From: Matthew J. Emerson
>>> Sent: Tuesday, December 07, 2004 17:46
>>> To: udm-users
>>> Subject: [udm-users] newlines
>>> Is there some UDM issue with newlines, where if you set a string-
>>> valued attribute of some object in UDM to a string which includes a
>>> newline, the newline is removed?
>>>
>>> Basically, in a GReAT transformation I?m setting an attribute to
>>>
>>>             std::string("\n") + GetType(Parameter) + std::
>>> string("\t") + std::string(Parameter.name())
>>>
>>> Where GetType is a function I wrote which returns a string.
>>> Everything works fine, but when I look at the output model of the
>>> transformation, all of the newlines have been stripped out of that
>>> attribute value.
>>>
>>> --Matt_______________________________________________
>>> great-users mailing list
>>> great-users at list.isis.vanderbilt.edu
>>> http://list.isis.vanderbilt.edu/mailman/listinfo/great-users
>
>
> _______________________________________________
> udm-users mailing list
> udm-users at list.isis.vanderbilt.edu
> http://list.isis.vanderbilt.edu/mailman/listinfo/udm-users
> _______________________________________________
> udm-users mailing list
> udm-users at list.isis.vanderbilt.edu
> http://list.isis.vanderbilt.edu/mailman/listinfo/udm-users


_______________________________________________
udm-users mailing list
udm-users at list.isis.vanderbilt.edu
http://list.isis.vanderbilt.edu/mailman/listinfo/udm-users


More information about the great-users mailing list