General XMetaL Discussion
craig_83 October 7, 2009 at 8:16 am
XMax and CSS – Style based on Attribute ProblemOctober 7, 2009 at 8:16 amParticipants 1Replies 2Last Activity 12 years, 8 months ago
I am using XMetal Developer (Visual Studio 2009 add on) to create CSS for my XMax control.
I want style and XML element based on its attribute value, for example:
In the style sheet this is defined as:
border: 1pt navy solid;
However, this formatting is not being applied. I have tried a few other elements and even tried a wildcard e.g. *[ParagraphFormat=”Item”], but the style is not being picked up. All the other styles, based on elements, work, the problem is just with styles based on attributes.
What could be the reason for this?craig_83 October 7, 2009 at 9:26 am
Reply to: XMax and CSS – Style based on Attribute ProblemOctober 7, 2009 at 9:26 am
I managed to solve this problem.
The style needed to inclued 'display: block;'. That's why, for example, the border wasn't being displayed. This obviously makes sense as you can only apply border elements to block elements when using HTML etc.Derek Read October 7, 2009 at 5:24 pm
Reply to: XMax and CSS – Style based on Attribute ProblemOctober 7, 2009 at 5:24 pm
Your assumption is correct for our products (that many CSS settings are only applicable to elements displayed as block).
Just to clarify though, the same is not true for most modern HTML browsers. However, we don't claim that our products are equivalent (or will ever be equivalent) to an HTML browser. An HTML browser has to be perfect at one thing: rendering HTML (perhaps several slightly different versions, but HTML nonetheless). Our editors must allow clients to render the content for [u]any[/u] DTD or Schema in a meaningful and easy to edit way.
So, the primary goal for us is to provide enough CSS formatting capability to make it possible to edit an XML (or SGML) document comfortably. A secondary goal for many of our clients that we try to fulfill to some extent is to have the editing view match their output fairly closely (some would like it to be exact). However, as it is possible to transform your XML or SGML into any conceivable output format we may never allow you to accomplish that goal entirely, though in many cases you can often come fairly close (the “good enough” factor).
In fact, we have some clients that actually purposefully style their content very differently from any of their output formats so that their authors completely ignore what that final output will appear as and force them to concentrate purely on the content. Of course, this does not mean the content is not displayed in an easy to read and edit fashion.
Some people have begun referring to the content displayed in XML editing software (any XML editing software, not just ours, and when it supports such a feature) not as WYSIWYG but as WYSIWOO: What You See Is One Option.
- You must be logged in to reply to this topic.