EDN Admin
Well-known member
Hello,
I am very new to xslt and have been reading the specs. I have gotten as far as getting it to actually output one record from my Dataset to the xml file but nothing beyond the first record. For a simple example here is my data:
<div style="color:Black;background-color:White; <pre>
emailaddress firstname lastname dayspastdue amountdue varfield1 varfield2 messageid
uid@domain.com Daniel Griffey 10 $50.00 5
uid@domain.com Sue Johns 50 $60.00 5
uid@domain.com John Jones 40 $75.00 5
uid@domain.com David Test 35 $125.00 5
uid@domain.com Mike Ike 55 $150.00 5
uid@domain.com Frank Bean 60 $175.00 5
uid@domain.com Judi Jones 125 $250 5
[/code]
Here is my XSLT:
<div style="color:Black;background-color:White; <pre>
<span style="color:Blue; <?<span style="color:#A31515; xml <span style="color:Red; version<span style="color:Blue; =<span style="color:Black; "<span style="color:Blue; 1.0<span style="color:Black; " <span style="color:Red; encoding<span style="color:Blue; =<span style="color:Black; "<span style="color:Blue; utf-8<span style="color:Black; "<span style="color:Blue; ?>
<span style="color:Blue; <<span style="color:#A31515; xsl<span style="color:Blue; :<span style="color:#A31515; stylesheet <span style="color:Red; version<span style="color:Blue; =<span style="color:Black; "<span style="color:Blue; 1.0<span style="color:Black; " <span style="color:Red; xmlns:xsl<span style="color:Blue; =<span style="color:Black; "<span style="color:Blue; http://www.w3.org/1999/XSL/Transform<span style="color:Black; " <span style="color:Red; xmlns:msxsl<span style="color:Blue; =<span style="color:Black; "<span style="color:Blue; urn:schemas-microsoft-com:xslt<span style="color:Black; " <span style="color:Red; exclude-result-prefixes<span style="color:Blue; =<span style="color:Black; "<span style="color:Blue; msxsl<span style="color:Black; "<span style="color:Blue; >
<span style="color:Blue; <<span style="color:#A31515; xsl<span style="color:Blue; :<span style="color:#A31515; output <span style="color:Red; method<span style="color:Blue; =<span style="color:Black; "<span style="color:Blue; xml<span style="color:Black; " <span style="color:Red; indent<span style="color:Blue; =<span style="color:Black; "<span style="color:Blue; yes<span style="color:Black; "<span style="color:Blue; />
<span style="color:Blue; <<span style="color:#A31515; xsl<span style="color:Blue; :<span style="color:#A31515; template <span style="color:Red; match<span style="color:Blue; =<span style="color:Black; "<span style="color:Blue; node()<span style="color:Black; "<span style="color:Blue; >
<span style="color:Blue; <<span style="color:#A31515; xsl<span style="color:Blue; :<span style="color:#A31515; copy<span style="color:Blue; >
<span style="color:Blue; <<span style="color:#A31515; email_address<span style="color:Blue; >
<span style="color:Blue; <<span style="color:#A31515; xsl<span style="color:Blue; :<span style="color:#A31515; value-of <span style="color:Red; select<span style="color:Blue; =<span style="color:Black; "<span style="color:Blue; /ExcelData/Table/emailaddress<span style="color:Black; "<span style="color:Blue; />
<span style="color:Blue; </<span style="color:#A31515; email_address<span style="color:Blue; >
<span style="color:Blue; </<span style="color:#A31515; xsl<span style="color:Blue; :<span style="color:#A31515; copy<span style="color:Blue; >
<span style="color:Blue; </<span style="color:#A31515; xsl<span style="color:Blue; :<span style="color:#A31515; template<span style="color:Blue; >
<span style="color:Blue; </<span style="color:#A31515; xsl<span style="color:Blue; :<span style="color:#A31515; stylesheet<span style="color:Blue; >
[/code]
and my results:
<div style="color:Black;background-color:White; <pre>
<span style="color:Blue; <?<span style="color:#A31515; xml <span style="color:Red; version<span style="color:Blue; =<span style="color:Black; "<span style="color:Blue; 1.0<span style="color:Black; "<span style="color:Blue; ?>
-<span style="color:Blue; <<span style="color:#A31515; ExcelData<span style="color:Blue; >
<span style="color:Blue; <<span style="color:#A31515; email_address<span style="color:Blue; >uid@domain.com<span style="color:Blue; </<span style="color:#A31515; email_address<span style="color:Blue; >
<span style="color:Blue; </<span style="color:#A31515; ExcelData<span style="color:Blue; >
[/code]
Any help would be greatly appreciated.
JB
View the full article
I am very new to xslt and have been reading the specs. I have gotten as far as getting it to actually output one record from my Dataset to the xml file but nothing beyond the first record. For a simple example here is my data:
<div style="color:Black;background-color:White; <pre>
emailaddress firstname lastname dayspastdue amountdue varfield1 varfield2 messageid
uid@domain.com Daniel Griffey 10 $50.00 5
uid@domain.com Sue Johns 50 $60.00 5
uid@domain.com John Jones 40 $75.00 5
uid@domain.com David Test 35 $125.00 5
uid@domain.com Mike Ike 55 $150.00 5
uid@domain.com Frank Bean 60 $175.00 5
uid@domain.com Judi Jones 125 $250 5
[/code]
Here is my XSLT:
<div style="color:Black;background-color:White; <pre>
<span style="color:Blue; <?<span style="color:#A31515; xml <span style="color:Red; version<span style="color:Blue; =<span style="color:Black; "<span style="color:Blue; 1.0<span style="color:Black; " <span style="color:Red; encoding<span style="color:Blue; =<span style="color:Black; "<span style="color:Blue; utf-8<span style="color:Black; "<span style="color:Blue; ?>
<span style="color:Blue; <<span style="color:#A31515; xsl<span style="color:Blue; :<span style="color:#A31515; stylesheet <span style="color:Red; version<span style="color:Blue; =<span style="color:Black; "<span style="color:Blue; 1.0<span style="color:Black; " <span style="color:Red; xmlns:xsl<span style="color:Blue; =<span style="color:Black; "<span style="color:Blue; http://www.w3.org/1999/XSL/Transform<span style="color:Black; " <span style="color:Red; xmlns:msxsl<span style="color:Blue; =<span style="color:Black; "<span style="color:Blue; urn:schemas-microsoft-com:xslt<span style="color:Black; " <span style="color:Red; exclude-result-prefixes<span style="color:Blue; =<span style="color:Black; "<span style="color:Blue; msxsl<span style="color:Black; "<span style="color:Blue; >
<span style="color:Blue; <<span style="color:#A31515; xsl<span style="color:Blue; :<span style="color:#A31515; output <span style="color:Red; method<span style="color:Blue; =<span style="color:Black; "<span style="color:Blue; xml<span style="color:Black; " <span style="color:Red; indent<span style="color:Blue; =<span style="color:Black; "<span style="color:Blue; yes<span style="color:Black; "<span style="color:Blue; />
<span style="color:Blue; <<span style="color:#A31515; xsl<span style="color:Blue; :<span style="color:#A31515; template <span style="color:Red; match<span style="color:Blue; =<span style="color:Black; "<span style="color:Blue; node()<span style="color:Black; "<span style="color:Blue; >
<span style="color:Blue; <<span style="color:#A31515; xsl<span style="color:Blue; :<span style="color:#A31515; copy<span style="color:Blue; >
<span style="color:Blue; <<span style="color:#A31515; email_address<span style="color:Blue; >
<span style="color:Blue; <<span style="color:#A31515; xsl<span style="color:Blue; :<span style="color:#A31515; value-of <span style="color:Red; select<span style="color:Blue; =<span style="color:Black; "<span style="color:Blue; /ExcelData/Table/emailaddress<span style="color:Black; "<span style="color:Blue; />
<span style="color:Blue; </<span style="color:#A31515; email_address<span style="color:Blue; >
<span style="color:Blue; </<span style="color:#A31515; xsl<span style="color:Blue; :<span style="color:#A31515; copy<span style="color:Blue; >
<span style="color:Blue; </<span style="color:#A31515; xsl<span style="color:Blue; :<span style="color:#A31515; template<span style="color:Blue; >
<span style="color:Blue; </<span style="color:#A31515; xsl<span style="color:Blue; :<span style="color:#A31515; stylesheet<span style="color:Blue; >
[/code]
and my results:
<div style="color:Black;background-color:White; <pre>
<span style="color:Blue; <?<span style="color:#A31515; xml <span style="color:Red; version<span style="color:Blue; =<span style="color:Black; "<span style="color:Blue; 1.0<span style="color:Black; "<span style="color:Blue; ?>
-<span style="color:Blue; <<span style="color:#A31515; ExcelData<span style="color:Blue; >
<span style="color:Blue; <<span style="color:#A31515; email_address<span style="color:Blue; >uid@domain.com<span style="color:Blue; </<span style="color:#A31515; email_address<span style="color:Blue; >
<span style="color:Blue; </<span style="color:#A31515; ExcelData<span style="color:Blue; >
[/code]
Any help would be greatly appreciated.
JB
View the full article