[XSL-LIST Mailing List Archive Home] [By Thread] [By Date]

Re: [xsl] Transforming Learning Object Metadata (LOM) problem.


Subject: Re: [xsl] Transforming Learning Object Metadata (LOM) problem.
From: David Carlisle <davidc@xxxxxxxxx>
Date: Tue, 12 Sep 2006 11:10:14 +0100

> and output is..
> <FIELD name="catalog>

you wouldn't get that output from the code you posted unless you are
using the text output method. If you are generating xml use the xml
output method (which is the default anyway) if you use the text output
method to generate xml you lose a vast part of the benefits of XSLT,
which is designed to ensure you always generate well formed xml.

  <xsl:for-each select="* [ count( . | key( 'gen-identifier', name()
  )[1] ) = 1 ] ">
  above line was to print out only one <Field> for same named elements.
  and I used muenchen method for grouping the same named elements
  because it was handy to use. Should I avoid using keys in this
  situation?

I suspect that the code is doing the wrong thing as you are comparing
children of _this_ element with a key that indexes the whole document.
(but i can't be sure what you want to do).

>how can I print new line in new xml file

character data in the stylesheet is just copied through
a
b
c
makes three lines each with a newline at the end. if the text node is
all white space you need to put it in xsl:text
so
<xsl:text>


</xsl:text>

makes some blank lines.

> print new line like <br/> in new xml file?
<br/. of course is something different, it is an element whaich
generates a newline when processed, to generate a br element in the
output just use <br/> 9and teh xml output method.


David


Current Thread
Keywords