There are several things you can do to improve the chances that you
will get helpful answers on XSL-List:
- asking specific enough questions that answers are possible. Describe
what you are trying to do, how you approached it, what happened, and
why you don't like the result you got.
- supplying small samples of files that illustrate your question or
problem. For example, an XML file, an XSLT stylesheet, the result
you got, and the result you want - all in miniature (and remembering
that everything posted to XSL-List is archived in public).
- describing the topic of your question concisely in the subject line
Good subject lines - those that describe the subject matter of your
message - not only increase the chances that you will receive answers
to questions or responses to comments, they also make your message
and any replies to it accessible in the list archives. In this case,
"Finding matching node in another XML document" would have been far
better than "XSLT newbie", which says nothing about your question.
-- Tommie
At 5:17 PM -0500 12/26/06, Thimmegowda, Balaji wrote:
Hi,
I am trying to achieve the following using XSLT :
I apply a XSLT on my source XML to get a path - say, books/author/name
Now, I want to see if this node exists in another xml. Is there a way by
which this can be achieved using XSLT ?
Sample Source XML : The dots are used as delimiters and will later be
replaced to slashes in the XSLT.
Paths.xml
<Paths>
<path1>books.book.author.name</path1>
<path2>books.book.name</path2>
</Paths>
------------------------------------------------------------------------
-------------
Sample Input XML.
Input.xml
<books>
<book>
<name>a1</book>
<price>10</price>
<author>
<name>b1</name>
<gender>m</gender>
</author>
</book>
<book>
<name>a2</book>
<price>10</price>
<author>
<name>b2</name>
<gender>f</gender>
</author>
</book>
</books>
The XSLT should first get the path from the paths.xml and search the
Input.xml to see if the node specified by the path exists. Can somebody
please let me know how to go about solving this.
Regards,
BT
--
======================================================================
B. Tommie Usdin
mailto:btusdin(_at_)mulberrytech(_dot_)com
Mulberry Technologies, Inc. http://www.mulberrytech.com
17 West Jefferson Street Phone: 301/315-9631
Suite 207 Direct Line: 301/315-9634
Rockville, MD 20850 Fax: 301/315-8285
----------------------------------------------------------------------
Mulberry Technologies: A Consultancy Specializing in XML and SGML
======================================================================
--~------------------------------------------------------------------
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--