[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: equivalent for 'while'
Hi
Thanks for all the responses. I've done a small but complete snippet of doc 1, doc 2 and the resulting doc 2 I'd like in order to compare the two files. -------------------- Document 1------------------------ <Top> <PrimeConcept id="at0000" type="EVALUATION"> <PrimeName>Pain</PrimeName> <SubPrimeConcept id="at0003">Headache</SubPrimeConcept> </PrimeConcept> <SubConcepts> <SubConcept id="at0027" name="Severity"> <Value type="TEXT">[MildSeverity,ModerateSeverity,SevereSeverity]</Value> </SubConcept> </SubConcepts> </Top> ---------------------- Document 2 -------------------------------- <?xml-stylesheet type="text/xsl" href="file://C:\Document2.xsl"?> <TOP id="1000" name="Thing"> <DEFCONCEPT id="10180" name="Pain"> <PARENT> <CONCEPT name="ExternalStimulusSensation" ref="10181"/> </PARENT> <CHILD> <CONCEPT name="HeadPain" ref="10235"/> </CHILD> </DEFCONCEPT> <DEFCONCEPT id="10235" name="HeadPain"> <PARENT> <CONCEPT name="Pain" ref="10180"/> </PARENT> <CHILD> <CONCEPT name="Headache" ref="10279"/> </CHILD> </DEFCONCEPT> <DEFCONCEPT id="10279" name="Headache"> <PARENT> <CONCEPT name="HeadPain" ref="10235"/> </PARENT> </DEFCONCEPT> </TOP> ------------------------ Resulting Document 2------------------------ <Top> <PrimeConcept id="10180" type="none"> <PrimeName>Pain</PrimeName> <SubPrimeConcept id="10279">Headache</SubPrimeConcept> </PrimeConcept> <SubConcepts> <SubConcept id="11000" name="Severity"> <Value type="TEXT">[MildSeverity,ModerateSeverity,SevereSeverity]</Value> </SubConcept> </SubConcepts> </Top> ----------------------------------------------------- The main concepts to compare in the two files are present in the <PrimeConcept> block. I'd like to determine the existence of the <PrimeName> and <SubPrimeConcept> in doc 2. Later I need other stuff to be determined but this is the main bit, initially. I also do not know in advance how many levels down I'd need to look to check the existence of <SubPrimeConcept> in doc 2. Hope this is what you and Andrew asked me to post. Appreciate all your help. Regards Rahil JBryant@xxxxxxxxx wrote: I do some similar things (such as combining child elements based on the presence of a parent element in two documents) in some of my XSL, so perhaps I can help.
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|