Please add the setProperty command to the wishlist for the next version of
XMLmind. I am attempting to write the Java command, but frankly I'm not a java
developer, and it's not looking good.
?
Cheers,
Jeff.
----- Original Message ----
> From: Hussein Shafie <hussein at xmlmind.com>
> To: Jeff Hooker <jeff at itwriting.ca>
> Cc: "xmleditor-support at xmlmind.com" <xmleditor-support at xmlmind.com>
> Sent: Wednesday, October 29, 2008 6:07:22 AM
> Subject: Re: [XXE] Hiding conditional content in XMLmind
>
> Jeff Hooker wrote:
> > The "why" is that we're using Docbook's profiling feature and the number of
> publications that we're sourcing out of each document can make the document
> hard
> to read when all the condiional text is visible.
> >?
> > CSS is, indeed, obvious. The question is how to allow the users to define
> > the
> values of the CSS. At the moment we're profiling on 4 attributes, each of
> which
> have up to eight values. The number of potential variations makes creating a
> custom CSS for each one impractical. I need to be able to to generate the
> customization layer for the CSS on the fly. That is the root of the question.
> >
> > Collapsible blocks would work for block content, but I'd prefer to avoid
> > using
> them in this context since it confuses the user experience; is the block
> collapsed because it's content that should not be reviewed or is it collapsed
> because the user collapsed it manually at some earlier time?
> >
> > So, to return to the root of the question, I'm looking for a way of
> > allowing
> the user to select from a list of attribute values and to have content tagged
> with those attribute valuee be either hidded or unhidden. One possible
> approach
> that has occured to me is that rather than trying to rewrite the CSS on the
> fly,
> I add a universal attibute like "view" to the content schema and then have a
> value in the CSS such as:
> >
> > *[view="hidden"] {
> >? ? ? content: url("hidden_foo.png");
> >
> > and then use a transform of some sort within XMLmind to assign the
> > attribute
> to every node containing the attributes and values that the use wants hidden.
> I'm looking for guidance on what a good approach would be for creating the
> transform.
> >
>
> --> An interactive *command* displaying a dialog box and then applying
> the desired changes to the document being edited should work fine.
>
> What is a command?
> http://www.xmlmind.com/xmleditor/_distrib/doc/commands/concepts.html
>
>
>
> --> I wouldn't recommend using a "view" attribute for that, because this
> changes the content of the document being edited. Instead, add a "view"
> *property* to some elements.
>
> What is a property? This is explained here: "XML node properties"
> http://www.xmlmind.com/xmleditor/_distrib/doc/dev/dom.html#nodeproperties
>
> How to style elements having certain properties? This is explained here:
> ":property() extension pseudo class"
> http://www.xmlmind.com/xmleditor/_distrib/doc/csssupport/properties.html
>
> How to add and remove properties? I would recommend writing a command in
> Java[tm] for that.
> http://www.xmlmind.com/xmleditor/_distrib/doc/api/com/xmlmind/xml/doc/Node.html#getProperty(com.xmlmind.xml.name.Name)
> http://www.xmlmind.com/xmleditor/_distrib/doc/api/com/xmlmind/xml/doc/Node.html#putProperty(com.xmlmind.xml.name.Name,%20java.lang.Object)
> http://www.xmlmind.com/xmleditor/_distrib/doc/api/com/xmlmind/xml/doc/Node.html#removeProperty(com.xmlmind.xml.name.Name)
>
> It is also probably possible to write an advanced, recursive,
> macro-command that would do it. For now, this is not possible because
> XXE has no setProperty command yet. If you really want to write such
> macro (which is harder than implementing the same functionality in
> Java!), simply ask us to add a setProperty command to next version of XXE.