Revision 32921
Added by Andrea Mannocci over 9 years ago
modules/dnet-eagle-profiles/trunk/src/main/resources/eu/dnetlib/functionality/modular/ui/xslt/emf_2_document.xslt | ||
---|---|---|
2 | 2 |
|
3 | 3 |
<xsl:stylesheet version="2.0" |
4 | 4 |
xmlns:xsl="http://www.w3.org/1999/XSL/Transform" |
5 |
xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:fn="http://www.w3.org/2005/xpath-functions"> |
|
5 |
xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:fn="http://www.w3.org/2005/xpath-functions" |
|
6 |
extension-element-prefixes="xsl xs fn"> |
|
6 | 7 |
|
7 | 8 |
<xsl:output method="html" encoding="UTF-8" indent="yes" omit-xml-declaration="yes"/> |
8 | 9 |
|
... | ... | |
513 | 514 |
<xsl:value-of select="concat(' ', local-name(), '="', ., '"')" /> |
514 | 515 |
</xsl:for-each> |
515 | 516 |
</xsl:variable> |
516 |
<xsl:value-of select="$indent" /> |
|
517 | 517 |
|
518 | 518 |
<xsl:if test="string-length($tag)"> |
519 |
<b><xsl:value-of select="concat('<',$tag)" /></b> |
|
519 |
<xsl:value-of select="$indent" /><b><xsl:value-of select="concat('<',$tag)" /></b>
|
|
520 | 520 |
<i><xsl:value-of select="$attribs" /></i> |
521 |
<b>></b> |
|
522 | 521 |
|
523 | 522 |
<xsl:choose> |
523 |
<xsl:when test="count(child::*) = 0 and count(child::text()) = 1"> |
|
524 |
<b>></b> |
|
525 |
<xsl:value-of select="normalize-space(.)" /> |
|
526 |
<b><xsl:value-of select="concat('</',$tag,'>')" /></b> |
|
527 |
</xsl:when> |
|
524 | 528 |
<xsl:when test="count(child::* | child::text()) > 0"> |
529 |
<b>></b> |
|
525 | 530 |
<xsl:for-each select="child::* | child::text()"> |
526 | 531 |
<xsl:choose> |
527 | 532 |
<xsl:when test="self::text() and string-length(normalize-space(.)) > 0"> |
528 |
<xsl:value-of select="normalize-space(.)" /> |
|
533 |
<xsl:value-of select="normalize-space(.)" /><br />
|
|
529 | 534 |
</xsl:when> |
530 | 535 |
<xsl:otherwise> |
531 | 536 |
<xsl:call-template name="xmlItem"> |
... | ... | |
537 | 542 |
</xsl:otherwise> |
538 | 543 |
</xsl:choose> |
539 | 544 |
</xsl:for-each> |
545 |
<xsl:value-of select="$indent" /><b><xsl:value-of select="concat('</',$tag,'>')" /></b> |
|
540 | 546 |
</xsl:when> |
541 | 547 |
<xsl:otherwise> |
548 |
<b> /></b> |
|
542 | 549 |
</xsl:otherwise> |
543 | 550 |
</xsl:choose> |
544 |
<xsl:value-of select="$indent" /> |
|
545 |
<b><xsl:value-of select="concat('</',$tag,'>')" /></b> |
|
551 |
|
|
546 | 552 |
</xsl:if> |
547 | 553 |
</xsl:template> |
548 | 554 |
|
Also available in: Unified diff
TEXT UBER TEMPLATE ACHIEVED!!