473,405 Members | 2,171 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,405 software developers and data experts.

variable data printing using xslt

1
I have a simple mailing list like this (below) and I want to produce a VERY simple address block using XSL for my newsletter. Just name, address, city-state-zip. That's all. So it prints the variable data on each successive page of my PDF newsletter.
I've been using XSL for a few months with good results and this is my next step up the ladder. Up to this point, my skill level allows me to use a for-each and apply-templates to produce content in the newsletter. Next I want to print many PDF copies with unique variable data addresses on each copy.
[code]
<contacts>
<addressblock>
<entity>entity</entity>
<last>last</last>
<first>first</first>
<address1>address1</address1>
<address2>address2</address2>
<zip>zip</zip>
</addressblock>
<addressblock>
<entity>Block Club</entity>
<last>Dentley</last>
<first>Denise</first>
<address1>1551 W. 95th</address1>
<address2>city state</address2>
<zip>60643</zip>
</addressblock>
</contacts>
[code]
My attempts have been useless so I don't have code to show you. But even an outline of how to proceed would be appreciated.
Aug 4 '07 #1
1 2980
jkmyoung
2,057 Expert 2GB
I assume you can pull it off with a single statement, but not with all?

Pseudo:
I suggest creating a variable with the result of the transformation of everything but the address block, eg the repeating newsletter part.

Then, use a for-each on the contacts to display the stored variable + the result of transforming the contact addressblock. The complexity of this depends on the complexity of your page.

You could do a for-each on the contacts and then inside, repeat the for-each on the content, but that is excessively slow.
Aug 7 '07 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

4
by: Son KwonNam | last post by:
In XSLT, is this possible to get value from xml using XPath which is in XSLT variable? I mean XPath strings can be dynamic while XSL Transforming. If possible, How?? Because I'm not a...
2
by: Jon Martin Solaas | last post by:
Hi, I have a general document somewhat like this: -------------------------------------- <root> <level1> <level2> <interestingstuff number="2"/> <interestingstuff number="3"/>...
6
by: utterberg | last post by:
Hi, I've got an xml that looks like this: <section name="Risk"> <label>RISK MANAGEMENT (RM)</label> <field name="RM.1"> <ref>RM.1</ref> <label>Text goes here...</label> <option...
4
by: Cathie | last post by:
Hi All, I am trying to get my style sheet to work. It works fine in IE but I can't get it to work in .net. Below is the function I use for transforming, where advancedOptionsFile is the path...
2
by: Darrel | last post by:
I have a control that transforms an XML file using XSLT. I also want to grab a particular variable out of the XML file. I thought an easy way to do this would be no have the XSLT just find the...
6
by: Jody Gelowitz | last post by:
I have run into an issue with variable scope within an XSLT document that is translated in VS.NET 2.0. Under VS.NET 1.1 (XslTransform), this code works fine. However, when using VS.NET 2.0...
2
by: 张韡武 | last post by:
We have preffered language set as variable in xslt: <xsl:variable name="preferred_language"> zh </xsl:variable> Data: <name xml:lang="de">Raw Materials (Mining incl.)</name> <name...
4
by: .NETUser | last post by:
Hello, I am doing research on printing in VB.NET and I would like to know how I can use XML to format three different reports. I'm new to this, so I don't know how to include this in my .NET...
3
by: rls03 | last post by:
I have the following which creates a variable containing a relative path where <xsl:value-of select="."/returns a portion of the filename: <xsl:variable...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.