Mark Fletcher wrote:
>
> A long time ago you gave me a pointer on how to use the xpath function
> within a concatenate function.
> (http://www.xmlmind.com/pipermail/xmleditor-support/2006-June/004234.htm
> l ) It's been working fine until my upgrade to 4.5.2.
>
> Here is a simplified snippet of my working CSS in 3.5.1, with
> annotations. (This css styles a map inclusion in a ditamap file.):
>
>
> *[class~="map/topicref"]:property("INCLUSION_MARK"):before,
> *[class~="map/topicref"][otherprops="mapref"]:before {
> content: division(
> content(
> paragraph(
> " (mapref)",
> color, gray,
> font-size, 11pt
> ),
> division(
> content(
> maprefPara(
> /* this
> retrieves the @title from the inclusion file */
> concatenate(
>
> "xpath(\"",
>
> "document('",
>
> xpath('property("LOCATION_INFO")'),
>
> "',.)/map/@title",
> "\")"
>
> ),
> /* this simply
> gets the url of the inclusion file */
>
> xpath('property("LOCATION_INFO")')
> )
> )
> )
> );
> }
>
>
> I'm trying to upgrade this code to 4.5.2, unsuccessfully. In this case,
> the @title is retrieved, but the url of the inclusion is not returned.
> Here's what I'm using:
>
> *[class~="map/topicref"]:property(prop|sourceURL):before,
> *[class~="map/topicref"][otherprops="mapref"]:before {
> content: division(
> content(
> paragraph(
> " (mapref)",
> color, gray,
> font-size, 11pt
> ),
> division(
> content(
> maprefPara(
> /* this still
> works */
> concatenate(
>
> "xpath(\"",
>
> "document('",
>
> xpath('property(prop|sourceURL)'),
>
> "',.)/map/@title",
> "\")"
>
> ),
> /* this does not
> work */
>
> xpath('property(prop|sourceURL)')
> )
> )
> )
> );
> }
>
> What am I doing wrong? I've tried being tricky and wrapping the
> property() call within a concat() within an outer xpath(), similar to
> what's being done with the successful document() call and that doesn't
> help.
>
* "prop|sourceURL" uses the standard CSS3 notation for XML qualified
names. To make it simple, this notation only works within CSS3 selectors.
* xpath('property(prop|sourceURL)') means: evaluate XPath expression
'property(prop|sourceURL)'.
You'll find the documentation of the property() XPath extension function
here:
http://www.xmlmind.com/xmleditor/_distrib/doc/commands/xpathextfunc.html
Note that the "prop|sourceURL" notation is not supported by this XPath
extension function.
You need to specify:
xpath('property("{http://www.xmlmind.com/xmleditor/namespace/property}sourceURL")')
--
XMLmind XML Editor Support List
[email protected]
http://www.xmlmind.com/mailman/listinfo/xmleditor-support