xml editor

Supported platforms

Compatible with Windows7 & Mac OS X Snow Leopard

Ready for data server software
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date]

[xsl] Insert space after the closing element


Subject: [xsl] Insert space after the closing element
From: "Selvaganesh" <selvaganesh_t@xxxxxxxxxxxxxx>
Date: Fri, 22 Jan 2010 12:43:12 +0530

Dear Team,

In my xslt developed as to be insert the space before the opening tag &
after the closing tag. But after space do not insert few condition. (e.g. if
found the dot, comma, colon, semi-colon & mdash after closing tags do not
insert the space.)

This is my current XSLT:

<hov:stylesheet xmlns:hov="http://www.w3.org/1999/XSL/Transform"
 xpath-default-namespace="http://xml.smg-uk.com/schema/cases/report"
version="2.0">

<hov:import href="Entity/entitynamesmap.xsl"/>
<hov:output method="xml" indent="yes"
use-character-maps="w3c-entity-names"/>

<hov:template match="text()">
<hov:value-of select="normalize-space()"/>
</hov:template>

<hov:template match="report">
<hov:element name="report"><hov:apply-templates/></hov:element>
</hov:template>

<hov:template match="para">
<hov:element name="para-text">
<hov:attribute name="indent"><hov:text>1</hov:text></hov:attribute>
<hov:apply-templates/></hov:element>
</hov:template>

<hov:template match="legis-cite"><hov:text> </hov:text><hov:element
name="citation"><hov:apply-templates/></hov:element><hov:text>
</hov:text></hov:template>
</hov:stylesheet>

This is my current Output: (do not insert the space after the "Rights arts
8</citation> and 11</citation>" or remove space before the "dot, comma,
colon, semi-colon & mdash" after the transformed file.

               <para-text indent="1"> 
                  <citation>European Convention on Human Rights arts
8</citation> , <citation>10</citation> and <citation>11</citation> .
               </para-text>

Actual required:

               <para-text indent="1"> 
                  <citation>European Convention on Human Rights arts
8</citation>, <citation>10</citation> and <citation>11</citation>.
               </para-text>

This is input: 

<para id="89471df0-f798-430f-bfd1-b0dc6e53bfee"><legis-cite>
                            <ancestor-part id="bfd1"/>
                            <ancestor-part id="bfd1a"/>European
                            Convention on Human Rights arts 8</legis-cite>,
<legis-cite>
                            <ancestor-part id="bfd2"/>
                            <ancestor-part id="bfd2a"/>10</legis-cite> and
<legis-cite>
                            <ancestor-part id="bfd3"/>
                            <ancestor-part
id="bfd3a"/>11</legis-cite>.</para>

Kindly guide me how can I modify in my XSLT.

Thanks,
Selva


Confidentiality Notice:  This transmittal is a confidential communication.  If you are not the intended recipient, you are hereby notified that you have received this transmittal in error and that any review, dissemination, distribution or copying of this transmittal is strictly prohibited.  If you have received this communication in error, please notify this office immediately by reply and immediately delete this message and all of its attachments, if any.


Current Thread
Keywords
XML Editor | XML Author | WYSIWYG Editors | Schema Editor | XSD Documentation | XSL/XSLT Editor | XQuery | XML Databases | SVN Client
© 2002-2011 SyncRO Soft Ltd. All rights reserved. | Sitemap | Privacy Policy | This website was created & generated with <oXygen/>®XML Editor