--> There is no way to access CSS generated content via XInclude. There
is no relationship whatsoever between CSS generated content and XInclude.
--> The following answer assumes that <LiteratureRef> contains
transcluded content, not a literal <xi:include> element.
You need to generate *exactly* the same number before <LiteratureRef>.
That is:
LiteratureRef:before {
content:
xpath("concat(format-number(count(ZZZ/preceding-sibling::ns:Literature)+1,'000'),'
')");
}
The key problem is to determine which XPath expression to use for ZZZ. I
would say that ZZZ is:
//ns:LiteratureList/ns:Literature[@Id = current()/ns:Literature/@Id]
The above ZZZ is based on the fact that <LiteratureRef> contains the
transcluded copy of the original <Literature> element. current() is the
standard XSLT function.
See http://www.w3.org/TR/xslt#misc-func
See also
http://www.xmlmind.com/xmleditor/_distrib/doc/commands/xpathextfunc.html
I've not tested the above code, but may be this approach could solve
your problem.
On 05/13/2013 09:14 AM, Stefan Klatt wrote:
-----Ursprüngliche Nachricht-----
Von: Hussein Shafie [mailto:huss...@xmlmind.com]
Gesendet: Sonntag, 12. Mai 2013 19:33
An: Stefan Klatt
Cc: 'xmleditor-support@xmlmind.com'
Betreff: Re: [XXE] How to access generated content via xinclude
On 05/12/2013 05:28 PM, Stefan Klatt wrote:
in our XML Dialect we number Literature lists with statements like
LiteratureList> Literatur:before {
content:xpath("concat(format-number(count(preceding-sibling::ns:LiteratureLi
st)+1,'000'),'
')");}
I would say it is ns:Literature and not ns:LiteratureList.
I understand this.
First we have a Section, numbererd by xpath in Literature:before
<LiteraturList>
001<Literatur Id="abc><Titel/><Autor/>...</Literatur>
002<Literatur Id="xyz><Titel/><Autor/>...</Literatur>
Inside our references we use<LiteratureRef> <xinclude href=""
xpointer="abc"/> </LiteratureRef>
and get Literatur, Titel, Author... but we see no way to show the
associated Number (without complex xpath statements)
Even if we use an additional<Nr> Element inside of<Literature> and
generate the Nr (by xpath) inside this element (not in the
:before), the Number issn`t available in the Reference.
The mean quesstion is: how to access genererted content in such a
constellation (via xinclude)
Same Problem exist (naturally) when accessing the numbered headings
(hierarchie) of
the document outline, For Example. .... as mentioned in 1.2.4
Anything...
[SK]
Thanks a lot
--
XMLmind XML Editor Support List
xmleditor-support@xmlmind.com
http://www.xmlmind.com/mailman/listinfo/xmleditor-support
--
XMLmind XML Editor Support List
xmleditor-support@xmlmind.com
http://www.xmlmind.com/mailman/listinfo/xmleditor-support