Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


[xsl] Standard Date/Time Publication Functions in XSL??

From: "Bruso, John" <jbruso@------------>
To:
Date: 8/2/2005 5:05:00 PM
Is there a way to publish the Date in XSL?

Like: Wednesday, July 23 2005

    -------------------------
John Bruso
Web Developer
ph  307.674-6446-2608







-----Original Message-----
From: Michael Kay [mailto:mike@xxxxxxxxxxxx]
Sent: Tuesday, August 02, 2005 10:24 AM
To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
Subject: RE: [xsl] Transformation of hierarchy, changing levels, and...
back

It looks to me as if what you're trying to describe is

"group Tuv element by their @Lang value"

So you need to look up Muenchian grouping (or XSLT 2.0
xsl:for-each-group if
you can use 2.0). See http://www.jenitennison.com/xslt/grouping.

But I may have misunderstood your requirement completely - I don't
understand the notations in your problem description.

Michael Kay
http://www.saxonica.com/


> -----Original Message-----
> From: Marcin Milkowski [mailto:milek_pl@xxxxx]
> Sent: 02 August 2005 16:13
> To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
> Subject: [xsl] Transformation of hierarchy, changing levels,
> and... back
>
> hi,
>
> I've been trying to make some transformation from a structure:
>
> <Tu>
> 	<Tuv>
> 		@Lang
> 		some text1
> 		<df>some text2</df>
> 		<ut>some optional text</ut>
> 		some text
> 		<ut>some more text</ut>
> 		and some text
> 	</Tuv>
> 	<Tuv>
> 		@Lang
> 		some text
> 		<df>
> 		some text
> 		</df>
> 		<ut>some optional text</ut>
> 		some text
> 		<ut>some more text</ut>
> 		and some text
> 	</Tuv>
> </Tu>
>
> to a structure
>
> <trans-unit>	(=Tu)
> 	@id
> 	<source> (=Tu/Tuv@Lang=$blabla)
>
> 		some text1
> 		<g@id@barfoo/>	(<df>)
> 		some text2
> 		<g@id@foobar/>	(</df>)
> 		<ph@id>some optional text</ph>(=ut)
> 		some text
> 		<ph@id>some more text</ut>
> 		and some text
>   	</source>
>
> 	<target> (=Tu/Tuv@Lang=$foobar)
> 		some text1
> 		<g@id@barfoo/>	(<df>)
> 		some text2
> 		<g@id@foobar/>	(</df>)
> 		<ph@id>some optional text</ph>(=ut)
> 		some text
> 		<ph@id>some more text</ut>
> 		and some text
> 	</target>
> </trans-unit>
>
> I tried to match //Tu, and then use for-each to match all
> Tuv[1]/ut and
> Tuv[2]/ut. This approach turned quite difficult because I had
> to insert
> ut at exactly the same position in source as it was in
> Tuv[1]. Probably
>    I should use more templates and match //Tu/Tuv or something like
> that, but I wouldn't know how to close the trans-unit tag (is there a
> way to check if this Tuv is Tu/Tuv[1] or Tu/Tuv[2]?). Additionally, I
> would need to produce a second file with ids replacing all
> text between
> tags in Tu/Tuv[1]@Lang=foobar and Tu/Tuv[2]@lLang=barfoo. (So
> the text
> must be uniquely numbered, or indexed in the other file). The
> third step
> would be to backconvert the transformed files into a source one.
>
> Any ideas what method would be the best in this case? All help very
> appreciated.
>
> Best regards,
> 	Marcin Milkowski


transparent
Print
Mail
Digg
delicious
Disclaimer
.

These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.

.
.

transparent

transparent