Re: [xsl] XML to XFDF Problem

Subject: Re: [xsl] XML to XFDF Problem
From: andrew welch <andrew.j.welch@xxxxxxxxx>
Date: Thu, 1 Dec 2005 09:56:59 +0000
I'm not sure I fully understand your problem but I'm guessing that you
want xml:space="preserve" to be in your output, whereas at the moment
it's operating on your stylesheet and preserving all the
presentational whitespace through to the output.

Try using this:

<xfdf xmlns="";>
    <xsl:attribute name="xml:space">preserve</xsl:attribute>

On 12/1/05, Russell, Simon <russels@xxxxxxxxxxxxxxx> wrote:
> Hi all,
> I will try to be brief, as I don't want to bore you all :)
> Basically this is the scenario.
> I have a raw xml file which I am trying to translate into xfdf, I am
> using Stylus Studio (Latest Version) to do this and I am selecting the
> .net processor to parse the xml.
> Now in the beginning I was using the built-in processor as I didn't know
> any better, I had my xslt file working perfectly to output exactly what
> I needed. But when our developer tried to use this code within his .net
> app the output was totally different.
> I then brought the code back to stylus and changed to the .net
> processor. I got the same result as my developer, the output was totally
> messed up.
> After much investigation I am convinced it is down to one thing.....the
> <xfdf> tag. An xfdf file should follow this format...
> <?xml version="1.0" encoding="UTF-8"?> <xfdf
> xmlns=""; xml:space="preserve"> Xml stuff goes
> here </xfdf>
> If remove the <xfdf xmlns="";
> xml:space="preserve"> tag from the start and the closing one at the
> bottom, my xml looks fine and how I expect except it but it is obviously
> missing the essential tag for it to work with Acrobat.
> My question to you all is this. Is there any way I can get my xfdf tags
> into the xml file without the parser going nuts when it hits them?
> Below is the non-working file.
> I hope someone can help.
> Many Thanks
> Simon Russell
> <?xml version="1.0" encoding="utf-8"?> <xsl:stylesheet version="1.0"
> xmlns:xsl="";
> exclude-result-prefixes="xml">
> <xsl:output method="xml" encoding="UTF-8" = indent="yes">
> </xsl:output>
> <xsl:template match="/">
>         <xfdf xmlns=""; xml:space="preserve">
>                 <xsl:element name="f">
>                         <xsl:attribute name="href">
>                                 <xsl:value-of select="/doc_template"/>
>                 </xsl:attribute>
>                 </xsl:element>
>                 <xsl:element name="ids">
>                         <xsl:attribute
> name="original">7A0631678ED475F0898815F0A818CFA1</xsl:attribute>
>                         <xsl:attribute
> name="modified">BEF7724317B311718E8675B677EF9B4E</xsl:attribute>
>                 </xsl:element>
>         <xsl:element name="fields">
>         <xsl:for-each select="/NewDataSet/results/node()">
>                 <xsl:element name="field">
>                                 <xsl:attribute name="name">
>                                         <xsl:value-of
> select="name()"></xsl:value-of>
>                                 </xsl:attribute>
>                                 <xsl:element name="value">
>                                         <xsl:value-of
> select="."></xsl:value-of>
>                                 </xsl:element>
>                 </xsl:element>
>         </xsl:for-each>
>         </xsl:element>
>         </xfdf>
> </xsl:template>
> </xsl:stylesheet>
> All information contained in this e-mail is Company Confidential.
> Voted one of the Sunday Times 2005 100 Best Companies To Work For
> Any opinions expressed in this message are those of the sender only and do
not necessarily represent the views or opinions of FIRSTPLUS Financial Group
or any associated companies.
> Registered Office: 1 Churchill Place, London E14 5HP
> Registration Number: 3315543
> The information contained in this message and any attachments is intended
solely for the use of the individual or entity to whom it is addressed. It may
contain privileged and confidential information and if you are not the
intended recipient you must not copy, distribute or take action reliant on it.
If you have received the e-mail in error please notify

Current Thread