This is Interesting: Free Magazines for Graphics designers and webmasters  


Home > Archive > Microsoft XML > May 2004 > xsl/xapth question





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author xsl/xapth question
ask

2004-05-22, 7:31 pm

Hi,
Is it possible to combine xpath with a small amount of xsl (just the select
keyword)?

I have a document like so:
<friend id="id1" ref="anotherFriend" name="bob" desc="great"/>

<person id="anotherFriend" name="peter" desc="good">
<child id="cid" name="peterson" desc="good"/>
</person>


I would like to write a XML file which has the xpath expressions. These
expressions
would be passed to msxml4 parser.

<alias name="myfriend" path=*/friend/@ref ; */person[@id=select(.)]" />

I am parsing this file using msxml4. I get the value of path attribute and
would like
to evaluate it. However, since xpath does not have this capability of
select (to my
knowledge), I am guessing I have to use xsl. This begs another question -
just
for the purpose of using select - have to bring in xsl.

Also, can msxml parser handle embedded xsl in another XML document?


Sponsored Links


Copyright 2003 - 2008 forum4designers.com  Software forum  Computer Hardware reviews