[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: Transforming Learning Object Metadata (LOM) proble
> 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
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|