xsl-list
[Top] [All Lists]

AW: AW: [xsl] double spaces how do i keep them

2012-03-06 04:10:59
Hm...I guess that's a little complicated since the whole stylesheet is immense.
I hoped that this might be some common problem and someone had a quick fix for 
it. 

If you don't need the whole stylesheet than this should be a working repro:

<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform";>

<xsl:template match="/">
        <test>
                 <xsl:call-template name="citation_meta"/>
        </test>
</xsl:template

<xsl:template name="citation_meta">
        <docinfo:custom-metafield name="citation-metadata">TY  - 
CASE</docinfo:custom-metafield>
        <docinfo:custom-metafield name="citation-metadata">T1  -<xsl:value-of 
....</docinfo:custom-metafield>
</xsl:template>

</xsl:stylesheet>

This is how I call it:

jxslt.jar com.sun.org.apache.xalan.internal.xslt.XsltPro -XSL 
stylesheets\casedoc_rechtssatz_at.xsl -IN test.xml -OUT output\test.xml

Hope that's what you wanted :/



. . . . . . . . . . . . . . . . . . . . . . . . . .
Ing. Patrick Szabo
 XSLT Developer 
LexisNexis
A-1030 Wien, Marxergasse 25

mailto:patrick(_dot_)szabo(_at_)lexisnexis(_dot_)at
Tel.: +43 1 53452 1573 
Fax: +43 1 534 52 146 


-----Ursprüngliche Nachricht-----

Von: Michael Kay [mailto:mike(_at_)saxonica(_dot_)com] 
Gesendet: Dienstag, 06. März 2012 10:01
An: xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com
Betreff: Re: AW: [xsl] double spaces how do i keep them

Well, the next step is to see if anyone else can reproduce the problem. 
That means supplying a runnable repro, with information on how you are 
running it.

Michael Kay
Saxonica

On 06/03/2012 08:54, Szabo, Patrick (LNG-VIE) wrote:
Hi,

Actually I posted the code (but I can see how one would think it's from the 
input - XML....sry!):

<docinfo:custom-metafield name="citation-metadata">TY  - 
CASE</docinfo:custom-metafield>

This is what's in the xslt in a template that does nothing but outputting 
elements.

Here's the whole template:

<xsl:template name="citation_meta">
      <xsl:variable name="fullcite">
              <xsl:call-template name="glpc:limitHeadingTemplate">
                      <xsl:with-param name="heading">
                              <xsl:call-template name="casedoc:toc-heading">
                                      <xsl:with-param name="citation" 
select="1"/>
                              </xsl:call-template>
                      </xsl:with-param>
              </xsl:call-template>
      </xsl:variable>
      <docinfo:custom-metafield name="citation-text"><xsl:value-of 
select="$fullcite"/></docinfo:custom-metafield>
      <docinfo:custom-metafield name="citation-metadata">TY  - 
CASE</docinfo:custom-metafield>
      <docinfo:custom-metafield name="citation-metadata">T1  -<xsl:value-of 
....</docinfo:custom-metafield>
      .
      .
      .
</xsl:template>

Like I said, only one space makes it to the resulting xml.

regards



. . . . . . . . . . . . . . . . . . . . . . . . . .
Ing. Patrick Szabo
  XSLT Developer
LexisNexis
A-1030 Wien, Marxergasse 25

mailto:patrick(_dot_)szabo(_at_)lexisnexis(_dot_)at
Tel.: +43 1 53452 1573
Fax: +43 1 534 52 146


-----Ursprüngliche Nachricht-----

Von: Michael Kay [mailto:mike(_at_)saxonica(_dot_)com]
Gesendet: Dienstag, 06. März 2012 09:48
An: xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com
Betreff: Re: [xsl] double spaces how do i keep them

On 06/03/2012 07:49, Szabo, Patrick (LNG-VIE) wrote:
Hi,

This might be the dumbest questions ever to be posted on this list but I
have the following code:

<docinfo:custom-metafield name="citation-metadata">TY  -
CASE</docinfo:custom-metafield>

What I get is this:

<docinfo:custom-metafield name="citation-metadata">TY -
CASE</docinfo:custom-metafield>

Once space is missing.

Can anyone tell me why ?
This is where we miss Jeni Tennison, who made her reputation on this
list by diagnosing bugs in code that wasn't posted.

Sadly, most of us mortals need to see the code before we can find the
bugs in it.

Michael Kay
Saxonica
There is no stylesheet applied after this one. There a couple of
stylesheets importet but that shouldn't make a difference since that is
a literal result element right ?

I've tried pretty much any method to output this.

regards




. . . . . . . . . . . . . . . . . . . . . . . . . .
Ing. Patrick Szabo
   XSLT Developer
LexisNexis
A-1030 Wien, Marxergasse 25

mailto:patrick(_dot_)szabo(_at_)lexisnexis(_dot_)at
Tel.: +43 1 53452 1573
Fax: +43 1 534 52 146






--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or 
e-mail:<mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--



--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or 
e-mail:<mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--




--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or 
e-mail:<mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--




--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--




--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--