General XMetaL Discussion
ada May 20, 2013 at 12:30 pm
Locating styling of elements in CSS and CTM filesMay 20, 2013 at 12:30 pmParticipants 2Replies 3Last Activity 9 years, 4 months ago
I was wondering if there is a anyway that I can click on an element and find out exactly where it is pulling its styling from. Is there a feature in Xmetal or a tool used with Xmetal that will tell me exactly where the styling is coming in for a certain element or class without having to look through multiple CSS and CTM files?
Something that basically does what the firebug plugin does in firefox?
Using Xmetal 6.0.2.070
EdDerek Read May 21, 2013 at 8:38 pm
Reply to: Locating styling of elements in CSS and CTM filesMay 21, 2013 at 8:38 pm
XMetaL Developer has a feature that allows you to jump from XMetaL Author to XMetaL Developer to work on both CSS and CTM settings (this has been available since version 4). When XMetaL Developer is installed and running two additional menu items appear at the bottom of XMetaL Author's Edit menu called “Edit CSS Style in XMD” and “Edit CTM Style in XMD”. See attached screen capture. Selecting one of these will take you to the corresponding file in the customization and directly to the setting for the currently selected element (you must have an XML document open of course).
Similarly, if you make a change to the CSS or CTM files using XMetaL Developer those changes show up in XMetaL Author immediately after you save the CSS or CTM file (no need to restart XMetaL Author or call additional APIs).
When you debug a document-level customization in XMetaL Author by starting that debug session from XMetaL Developer, a new blank XML document using that customization is created. The two pieces of software are then linked together providing these two additional features as well as the ability to step through macros and “modify and continue” in some cases.ada May 30, 2013 at 5:39 pm
Reply to: Locating styling of elements in CSS and CTM filesMay 30, 2013 at 5:39 pm
Thanks Derek. I have just installed VS.NET 2008 and also installed Xmetal Developer 6. I have certain xml files that I am editing that are pulling in there styling (Css and Ctm) from C:Program FilesXMetaL 6.0AuthorDITAXACs. In there you probably know that I have folders for ditabase, concept, map, docstd_shell, etc, since I am working with Dita. I have been manually editing these CSS and CTM files in those folders but this is a hassle because I have to search through multiple css/ctm files at a time to try to find what I want to edit. This “Edit CSS Style in XMD” option will defintely save me some time searching. However, I am not sure how to use VS.NET properly to get those options to show up. How do I get it to come up for me?Derek Read May 31, 2013 at 12:56 am
Reply to: Locating styling of elements in CSS and CTM filesMay 31, 2013 at 12:56 am
The DITA functionality is not designed to be modified using XMetaL Developer. It uses some advanced techniques that XMetaL Developer can't help with (particularly the scripts that are loaded). In order for you to really do what you are asking I think we would need to make the DITA authoring functionality available as an XMetaL Developer project, but there isn't one. We have many developers working on different parts of it using all kinds of different tools and the system is highly modular, so the way it is pieced together doesn't lend itself to being an XMetaL Developer project.
For a standard customization (anything people create for authoring other than DITA) you would start by making a new project in XMetaL Developer (in this case a “document customization”) using the File > New menu item in Visual Studio, and then adding a DTD or XSD to it. Then you would either build new CSS and CTM files from scratch or import existing ones (the document customization wizard gives you that option). Then using this project you can debug it from Visual Studio's debug menu (or F5). That launches XMetaL Author and loads the customization. When you do this those two extra menu items will appear in the Edit menu in XMetaL Author.
The good news is that due to the way the DITA CSS files are organized it is easy to locate the selector for any given element (if it has one). I would recommend using Visual Studio's search (or even a tool like Notepad++ for anyone without Visual Studio) to search among the DITA CSS files for the name of the element you are looking for. Even though the selectors we have defined for DITA don't use the element name (they use DITA class attribute values in order to support specialization) a comment containing the base element name is usually right next to the actual selector.
- You must be logged in to reply to this topic.