Thanks Hussein, that's a big help. [My question was about how to use
collapser() and xpath() to generate a summarized version of child nodes when
collapsed].

The css you sent (sample2.css, re-attached here) causes some strange display
behavior. When the node is expanded it displays as expected. When collapsed,
the collapsed line of text has the correct content (including generated),
but is indented by a couple of inches.

Any idea what is causing this?

Thanks.


 > -----Original Message-----
 > From: xmleditor-support-bounces at xmlmind.com
 > [mailto:xmleditor-support-bounces at xmlmind.com]On Behalf Of Hussein
 > Shafie
 > Sent: Tuesday, May 18, 2004 6:04 AM
 > To: Poster at Kinetium dot Com
 > Cc: xmleditor-support at xmlmind.com
 > Subject: Re: [XXE] path expression question
 >
 >
 > Poster at Kinetium dot Com wrote:
 > > I'm afraid I will display my ignorance here, but ... please
 > point me at the
 > > appropriate part of the docs if I missed it there.
 > >
 > > 1) ------------
 > > If I have:
 > > <a>a1
 > >   <b>name1
 > >      <c>foo1</c>
 > >   </b>
 > >   <b>name2
 > >      <c>foo2</c>
 > >   </b>
 > > </a>
 > > <a>a2
 > >   <b>name2
 > >   </b>
 > > </a>
 > >
 > > What stylesheet will let me see just the <a> elements with their text
 > > appended with the first text node of the first <b>element
 > (with <b> and <c>
 > > elements totally hidden e.g. display: none).
 > >
 > > i.e. display
 > >
 > > a1: name1
 > > a2: name2
 >
 > ---
 > root {
 >      display: block;
 > }
 >
 > a {
 >      display: block;
 > }
 >
 > a:after {
 >      display: inline;
 >      content: ": " xpath("./b[1]/text()[1]");
 >      color: gray;
 > }
 >
 > b,
 > c {
 >      display: none;
 > }
 > ---
 >
 >
 > > 2) ------------
 > > How can I make this collapsed display appear only when the <a>
 > elements are
 > > "collapsed"?
 >
 > ---
 > root {
 >      display: block;
 > }
 >
 > a {
 >      display: block;
 >      margin-left: 4ex;
 >      collapsible: yes;
 >      collapsed-content:
 >        xpath("concat(./text()[1], ': ', ./b[1]/text()[1])");
 > }
 >
 > a:before {
 >      display: marker;
 >      content: collapser();
 > }
 >
 > b {
 >      color: maroon;
 >      display: block;
 > }
 >
 > c {
 >      color: navy;
 > }
 > ---
 >
 > This is currently the best XXE can do.
 >
 > Attached samples can be used to test this directly with XXE. You can
 > switch from first style sheet to the second one using XXE's Style menu.
 >
 > All this is documented in
 > http://www.xmlmind.com/xmleditor/_distrib/docs/csssupport/index.html and
 > in the XPath 1.0 recommendation, which of course, does not mean that it
 > is simple to find out how to do it.
 >
-------------- next part --------------
A non-text attachment was scrubbed...
Name: sample.xml
Type: text/xml
Size: 316 bytes
Desc: not available
Url : 
http://www.xmlmind.com/pipermail/xmleditor-support/attachments/20040729/655de2e5/attachment.xml
 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: sample2.css
Type: text/css
Size: 308 bytes
Desc: not available
Url : 
http://www.xmlmind.com/pipermail/xmleditor-support/attachments/20040729/655de2e5/attachment.css
 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: sample.css
Type: text/css
Size: 181 bytes
Desc: not available
Url : 
http://www.xmlmind.com/pipermail/xmleditor-support/attachments/20040729/655de2e5/attachment-0001.css
 

Reply via email to