Re: Referencing content in XML and then processing in
> Is there any way I can use my own "id" name for this, e.g. > "domain-id", or does XSLT expect refs to always point to "id". I am > trying to steer clear of the reserved "id" attribute since I may one > day need to include and preserve external data id's as well as my own. You can use whatever you like - "domain-id" and "domain-ref" for example. "id" isn't reserved by the way, so you could use that now. id/idrefs I've never used (as I don't see the point) but they only work when your xml is validated to mark certain fields as ids. Simply having an attribute called "id" isn't enough for the id() function to return it. > Also, is there any way to make your solution work if the referencing > content is inside an attribute of an element > e.g. <company product="The editor <producttype-ref > ref-id="manual1"/>"> That looks awful. Escaped markup is nearly always wrong. Why not make it: <company> <product>The editor <producttype-ref ref-id="manual1"> ... -- Andrew Welch http://andrewjwelch.com Kernow: http://kernowforsaxon.sf.net/
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