Subject: [xsl] Suggestion: transparent id-ref traversal with XPath?|
From: Gunther Schadow <gunther@xxxxxxxxxxxxxxxxxxxxxx>
Date: Mon, 19 May 2003 16:05:45 -0500
Hi, just to bounce off an idea. Suppose I have this very simplified use case:
<order> <billingAddress> ... </billingAddress> <shippingAddress> ... </shippingAddress> </order>
and suppose I am tracking addresses as location objects with lots of data such as, street, telephone number, GPS location, map drawing, picture of the front of the builing and other stuff (hey this is just an example, my real use case is special.) The point is this: in a significant number of cases one address will be the SAME (= IDENTICAL) address-object and I may not want to have to repeat its data for both in an instance. The reason is not just to save space but also because I know that the two addresses are IDENTICAL I don't want to send two copies of them.
<order> <billingAddress id="1"> ... </billingAddress> <shippingAddress ref="1"/> </order>
when it comes to XSLT and writing XPath expression, however, things get more complicated now. I now have to add conditional paths that go
Wouldn't it be cool if one could somehow specify in XSLT that there are certain links that XPath could translate?
and then the XPath engine would handle this transparently? Well, I suppose I could also do this union instead:
-- Gunther Schadow, M.D., Ph.D. gschadow@xxxxxxxxxxxxxxx Medical Information Scientist Regenstrief Institute for Health Care Adjunct Assistant Professor Indiana University School of Medicine tel:1(317)630-7960 http://aurora.regenstrief.org