I have an XML document (A) which I need to transform using a stylesheet (S).
I intend to do this by loading a second XML document with structure information in it (B)
I have no control over document A, just B and S.
My problem is as follows:
I start to process with document A as the context document, then I do a for-each selecting the other document e.g. select="document(B.xml)/*/*"
Now the context document is document B. I can then read some structure information into a variable e.g. name='a_xpath' select='@xpath'.
the xpath I have just read refers to document A. I now need to select from document A using the xpath I just retrieved from B.
Is this possible?
The second issue with this is that I need to remain in the context of B as I need to iterate through several nodes and children. I also do not know the name of document A unless there is a way to get that in XSLT so cannot use document().
I intend to do this by loading a second XML document with structure information in it (B)
I have no control over document A, just B and S.
My problem is as follows:
I start to process with document A as the context document, then I do a for-each selecting the other document e.g. select="document(B.xml)/*/*"
Now the context document is document B. I can then read some structure information into a variable e.g. name='a_xpath' select='@xpath'.
the xpath I have just read refers to document A. I now need to select from document A using the xpath I just retrieved from B.
Is this possible?
The second issue with this is that I need to remain in the context of B as I need to iterate through several nodes and children. I also do not know the name of document A unless there is a way to get that in XSLT so cannot use document().