HighDots Forums  

simple question

alt.html.tags alt.html.tags


Discuss simple question in the alt.html.tags forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Debacle
 
Posts: n/a

Default simple question - 09-19-2003 , 04:17 AM






I´ve got a file with over 2000 pairs of lines like these:

<base loc="en" >some text</base>
<tran loc="fr" origin=""></tran>

And I want to copy text from base to tran, like this:

<base loc="en" >some text</base>
Quote:
tran loc="fr" origin="">some text</tran
All the text strings are different.
How can I automate this task? any advice?

TIA

Fran


Reply With Quote
  #2  
Old   
Jukka K. Korpela
 
Posts: n/a

Default Re: simple question - 09-19-2003 , 05:17 AM






Debacle <yaya (AT) yeyo (DOT) no> wrote:

Quote:
I´ve got a file with over 2000 pairs of lines like these:

base loc="en" >some text</base
tran loc="fr" origin=""></tran
That's interesting. Has it got something to do with HTML tags?

Quote:
And I want to copy text from base to tran,
Huh? What's "base", and who's "tran"?

Quote:
like this:

base loc="en" >some text</base
tran loc="fr" origin="">some text</tran
So you mean you wish to transform data somehow. Sounds like a job for some
XML-related tool, _if_ the data in XML format (which we cannot know from
the excerpt you gave). Good luck; it's surely not an HTML question.

--
Yucca, http://www.cs.tut.fi/~jkorpela/
Pages about Web authoring: http://www.cs.tut.fi/~jkorpela/www.html




Reply With Quote
  #3  
Old   
Debacle
 
Posts: n/a

Default Re: simple question - 09-19-2003 , 06:06 AM



You´re right Jukka, it´s really a XML file, but I assumed that could be a
kind of common issue in any tagged format.
thanks anyway.


Quote:
So you mean you wish to transform data somehow. Sounds like a job for
some XML-related tool, _if_ the data in XML format (which we cannot
know from the excerpt you gave). Good luck; it's surely not an HTML
question.

Reply With Quote
  #4  
Old   
DMc
 
Posts: n/a

Default Re: simple question - 10-24-2003 , 11:06 PM



Use an xsl file. Using <xsl:for-each> loop thru all <base> and assign to
<tran> using the position() function.

DMc.



"Debacle" <yaya (AT) yeyo (DOT) no> wrote

Quote:
I´ve got a file with over 2000 pairs of lines like these:

base loc="en" >some text</base
tran loc="fr" origin=""></tran

And I want to copy text from base to tran, like this:

base loc="en" >some text</base
tran loc="fr" origin="">some text</tran

All the text strings are different.
How can I automate this task? any advice?

TIA

Fran



Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.