RE: [xsl] how can I deal with the xml problems

Subject: RE: [xsl] how can I deal with the xml problems
From: "Michael Kay" <michael.h.kay@xxxxxxxxxxxx>
Date: Mon, 25 Nov 2002 09:30:19 -0000
Your title suggests you have a specific problem. But in the body of the
message you're simply asking us to implement a transformation for you.

There are people on this list who sometimes do that, but it's not a good
idea, because it doesn't address your specific learning difficulty.

What aspect of this problem are you finding difficult to solve for
yourself? Is it simply in knowing how to access two different source
documents in a transformation, or is it something deeper?

Michael Kay
Software AG
home: Michael.H.Kay@xxxxxxxxxxxx
work: Michael.Kay@xxxxxxxxxxxxxx 


> 
> >>Hello dear firend:
> 
> >>I have a question here ,could you kind enough to give me a quick 
> >>answer
> please? i have 3 xml documents here, first one is
> >>fellowship:
> >><?xml version="1.0" ?>
> >>- <fellowship id="1000">
> >>   <title>Entertainment Club</title>
> >>   <descr>welcome to this amazing club</descr>
> >>- <members>
> >>- <member id="200201">
> >>   <link url="file:// wangning" />
> >>   </member>
> >>- <member id="200202">
> >>   <link url="file://Derek" />
> >>   </member>
> >>   </members>
> >>   </fellowship>
> >>
> >>and the other two have the same structure one is fellow1.xml
> >>
> >><?xml version="1.0" ?>
> >><fellow>
> >>   <name>Ning</name>
> >>   <surname>Wang</surname>
> >>   <email>ilydear@xxxxxxxxxxx</email>
> >>  <resources>
> >>  <resource id="001" type="mp3">
> >>   <title>Hero</title>
> >>   <author id="Sony">John</author>
> >>   <description>Famous in UK.</description>
> >>   <location url="file://wangning" />
> >>   </resource>
> >>  <resource id="002" type="mp3">
> >>   <title>Titanic</title>
> >>   <author id="BMW">Jane</author>
> >>   <description>Famous in World!.</description>
> >>   <location url="file://wangning" />
> >>   </resource>
> >>   </resources>
> >>   </fellow>
> >>
> >>and fellow2.xml
> >>
> >><?xml version="1.0" ?>
> >>- <fellow>
> >>   <name>Derek</name>
> >>   <surname>Ben</surname>
> >>   <email>derek@xxxxxxxxxxx</email>
> >>- <resources>
> >>- <resource id="003" type="ebook">
> >>   <title>Ghost</title>
> >>   <author id="UK">TomJohson</author>
> >>   <description>Written in 1978.</description>
> >>   <location url="file://Derek" />
> >>   </resource>
> >>- <resource id="004" type="ebook">
> >>   <title>Angel</title>
> >>   <author id="USA">Jerry</author>
> >>   <description>very good imagination!.</description>
> >>   <location url="file://Derek" />
> >>   </resource>
> >>   </resources>
> >>   </fellow>
> >>
> >>The question here is how I can merge the two documents to a new xml 
> >>document according to the following given catalogue.dtd
> >>
> >>catalogue.dtd
> >>
> >>  <!ELEMENT catalogue (items)>
> >>  <!ATTLIST catalogue id ID #REQUIRED>
> >>
> >>  <!ELEMENT items (item)*>
> >>
> >>  <!ELEMENT item (type, title, author*, description, location,
> >>owner)>
> >>  <!ATTLIST item id ID #REQUIRED>
> >>
> >>  <!ELEMENT type (#PCDATA)>
> >>
> >>  <!ELEMENT title (#PCDATA)>
> >>
> >>  <!ELEMENT author (#PCDATA)>
> >>  <!ATTLIST author id CDATA #REQUIRED>
> >>
> >>  <!ELEMENT description (#PCDATA)>
> >>
> >>  <!ELEMENT location EMPTY>
> >>  <!ATTLIST location url CDATA #REQUIRED>
> >>
> >>  <!ELEMENT owner EMPTY>
> >>  <!ATTLIST owner id CDATA #REQUIRED
> >>                    url CDATA #REQUIRED>
> >>
> >>I hope there is a quick and simple way to do it !
> >>
> >>Thank you very much!
> >
> 
> 
> _________________________________________________________________
> 与联机的朋友进行交流,请使用 MSN Messenger:
http://messenger.msn.com/lccn/ 
> 
> 
>  XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
> 


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Current Thread