עזרה ב xsl ?
יש לי קובץ xml שנראה ככה:
יש לי קובץ xml שנראה ככה:
<?xml version="1.0" standalone="yes"?> <?xml-stylesheet type="text/xsl" href="study.xsl"?> <NewDataSet> <study> <patient_id>123</patient_id> <patients_name>moshe</patients_name> <patients_birth_date>1/1/1980</patients_birth_date> </study> <study> <patient_id>144</patient_id> <patients_name>david</patients_name> <patients_birth_date>1/1/1980</patients_birth_date> </study> </NewDataSet>
אני רוצה ליצור ממנו קובץ xml אחר, שיראה כך:<queryResults xmlns="http://www.xyz.com/bbb"> <resultItem num="1"> <resultElement field="patient_id">123</resultElement> <resultElement field="patients_name">moshe</resultElement> <resultElement field="patients_birth_date">1/1/1980</resultElement> </resultItem> <resultItem num="1"> <resultElement field="patient_id">144</resultElement> <resultElement field="patients_name">david</resultElement> <resultElement field="patients_birth_date">1/1/1980</resultElement> </resultItem> </queryResults>
כתבתי לי קובץ xsl אבל בינתיים הוא לא מצליח לעשות את העבודה. אם מישהו יכול לעזור בזה או לתת עצה, אני מאד אשמח. תודה.