[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

XML to XFDF Problem

Subject: XML to XFDF Problem
From: "Russell, Simon" <russels@xxxxxxxxxxxxxxx>
Date: Thu, 1 Dec 2005 09:18:00 -0000
russell simon
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="http://ns.adobe.com/xfdf/" xml:space="preserve"> Xml stuff goes
here </xfdf>

If remove the <xfdf xmlns="http://ns.adobe.com/xfdf/"
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="http://www.w3.org/1999/XSL/Transform"
exclude-result-prefixes="xml">
<xsl:output method="xml" encoding="UTF-8" = indent="yes">
</xsl:output>
<xsl:template match="/">
	<xfdf xmlns="http://ns.adobe.com/xfdf/" 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

COMPANY CONFIDENTIAL UNLESS STATED OTHERWISE.

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
Administrator@xxxxxxxxxxxxxxx

Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.