I am using the XML toolkit for the transform. I need to send the data to a third
party, who has a set format that
cannot be changed. I do not know what parser they are using (I will ask).
The XML source is as follows: (created by SQL Server 7 using SQLXML Web Release 2).
<root>
<VG_Submission>
<MemberID>95929</MemberID>
<SubmissionID>4279</SubmissionID>
[tags removed]
<VG_FieldValue>
<body>[long text removed]</body>
<VG_SubmissionPackage><PackageID>96</PackageID></VG_SubmissionPackage>
</VG_FieldValue>
<VG_FieldValue>
<body>[long text removed]</body>
<VG_SubmissionPackage><PackageID>105</PackageID></VG_SubmissionPackage>
</VG_FieldValue>
</VG_Submission>
</root>
-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]On Behalf Of tom dyson
Sent: Friday, December 07, 2001 1:52 PM
To: [EMAIL PROTECTED]
Subject: Re: [cf-xml] Unexpected output for XSLT
Hi Chris
It would be good to see your XML source and the way that you're calling the
transformation. Do you have any particular need to create the document in
this format? All XML parsers that I know of (and definitely MSXML) will
treat
<foo></foo>
just the same as
<foo />
So it shouldn't make any difference to your application, unless compactness
is a key concern.
Tom
-----------------+
tom dyson
t: +44 (0)1608 811870
m: +44 (0)7958 752657
http://torchbox.com
> I have included a partial XSL sample that I am currently working with at the
> bottom of this message. I would like to
> produce the following output: (BTW, I am using MSXML4)
>
> <data name="SubmissionID" value="1234" />
> <data name="ProductSKU" value="x1234x5678" />
>
> The output I am getting is this:
>
> <data name="SubmissionID" value="1234" />
> <data name="ProductSKU" value="x1234x5678"></data>
>
>
> <xsl:element name="data">
> <xsl:attribute name="name">SubmissionID</xsl:attribute>
> <xsl:attribute name="value"><xsl:value-of select="//SubmissionID"
> /></xsl:attribute>
> </xsl:element>
> <xsl:element name="data">
> <xsl:attribute name="name">ProductSKU</xsl:attribute>
> <xsl:attribute name="value"><xsl:for-each
> select="//PackageID"><xsl:text>x</xsl:text><xsl:value-of select="."
> /></xsl:for-each></xsl:attribute>
> </xsl:element>
-----------------------+
cf-xml mailing list
list: [EMAIL PROTECTED]
admin: [EMAIL PROTECTED]
home: http://torchbox.com/xml
-----------------------+
cf-xml mailing list
list: [EMAIL PROTECTED]
admin: [EMAIL PROTECTED]
home: http://torchbox.com/xml