Jump to content
Sign in to follow this  
tkakavros

XSLTQuestion

Recommended Posts

I am new when it comes to creating a style sheet to be used when importing xml data. I have read through the previous posts and I have changed my code numerous times and I am still not having any luck. I would appreciate any help!

XML Data:

<?xml version="1.0" encoding="ISO-8859-1" ?>

-

-

5465182

xxxx

2

$249.62

G5465182

$47.05

$296.67

COLUMBIANA, OH

1-800-333-9974

WILSON, NC

1-800-545-3017

$1,680.50

$1,445.23

$14.35

$70.58

$320.20

$94.11

$343.73

900

1700

Style Sheet:

<?xml version="1.0" encoding="ISO-8859-1"

0

Edited by Guest

Share this post


Link to post
Share on other sites

Not sure exactly what problems you are experiencing, but they are most likely caused by line #2 of your XML Data:

To begin with, the text "- " is not contained by any element, and it will cause an error.

If you remove this text, the element will be "wrapping" the rest of the data - so you need to change your for-each selection to:

Share this post


Link to post
Share on other sites

The source of the xml data does not have the "-" I just copied that content from the web viewer within File Maker. If I open my style sheet within a XML writer and if I check the style sheet if it is well formed I get an invalid syntax error for line 2 of the style sheet.

When I'm in File Maker and I try to import the xml data from the url I get an Error that says... XML parsing Error: Expected a 'version=', encoding=', or 'standalone=' Line Number:2 Column Number:16

Share this post


Link to post
Share on other sites

Can you attach a zipped version of both text files? There are limits to what this forum can show. If your source is served, open it in a web browser and save it as text.

Share this post


Link to post
Share on other sites

The xml declaration must end with "?>". I am not sure if this is a transmission problem (I suggested zipping the files), but once I fixed that, it worked.

stylesheet.xsl.zip

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×

Important Information

By using this site, you agree to our Terms of Use.