Eclipse : how to disable validation for SVG files - eclipse

I cant figure a way to disable validation for SVG files in eclipse. I tried to add an exception for xml validation in the validation configuration page, but it did not work. I have a file from bootstrap 3 (glyphicons-halflings-regular.svg) that has an error marker ( dtd compliance probably ) I would like to either exclude this specific file from validation OR disable validation of SVG files all together.
Any help appreciated.
edit : I am using eclipse Luna
The error message in the SVG file says :
Description Resource Path Location Type
The content of element type "font-face" is incomplete, it must match "((font-face-src,(desc|title|metadata))|((desc|title|metadata)+,font-face-src,((desc|title|metadata))?))". glyphicons-halflings-regular.svg /myApp/src/main/webapp/js/vendor/bootstrap-3 line 6 XML Problem

This is a problem related with the validator not with the bootstap SVG file, since the definition is right, if you check the definition of defs Element it allows an font element.
Also from mozilla sources:
Permitted content:
Any number of the following elements, in any order:
Animation elements
Descriptive elements
Shape elements
Structural elements
Gradient elements
and
<a>, <altglyphdef>, <clippath>, <color-profile>, <cursor>, <filter>, <font>, <font-face>, <foreignobject>, <image>, <marker>, <mask>, <pattern>, <script>, <style>, <switch>, <text>, <view>
Normative document SVG 1.1 (2nd Edition)
So you can add to ignore in eclipse validator, please check this topic: How to exclude specific folders or files from validation in Eclipse?

Related

Have VSCode ignore specific reference links in markdown validation

In Visual Studio Code with Markdown validation enabled (markdown.validate.enabled: true), I can ignore links to specific files that may not exist in the current context via the markdown.validate.ignoredLinks setting. However, that setting does not seem to apply to reference links (e.g. [link]: some-reference), nor can I find a corresponding setting specific to reference links.
Why do I want this? My specific use-case involves an extension the "standard" (CommonMark) markdown format to auto-generate a table-of-contents using the following syntax (and no, I don't expect VSCode to generate a preview of that TOC):
[[_TOC_]]
<!-- or -->
[TOC]
VScode happily generates a warning for such links, namely:
No link definition found: 'TOC' (link.no-such-reference)
Somewhat obviously, I can make the warning disappear I define a (bogus) TOC reference, such as:
[toc]: bogus
I can also disable validation of all reference links ("markdown.validate.referenceLinks.enabled": false), but I don't want to do that. I want to ignore the error for a specific reference, much like one can ignore a GLOB pattern for file links (markdown.validate.ignoredLinks).
Does anyone know of a such a setting before I submit a bug/missing-feature report?

This file has Custom XML elements that are no longer supported in Word. Saving the file will remove these elements permanently

One of my customers has reported seeing the following message when working in documents created from templates that I provided:
This file has Custom XML elements that are no longer supported in Word. Saving the file will remove these elements permanently.
I understand that this message relates to Custom XML Markup (https://learn.microsoft.com/en-us/office/troubleshoot/word/custom-xml-elements-not-supported). I can confirm that there is no Custom XML Markup in the document.
Any idea what could be causing this error to display?

Using JSTL fmt:message in a Eclipse IDE Maven Spring 4 Java Web Project

I googled the following questions, but answers to them I was unable to find. They are interrelated so I am putting them together in one post. I am a Java backend developer using Eclipse IDE, using JSTL fmt:message tags in a Maven Spring 4 Java project.
Question #1:
If you have a jsp file, that includes another jsp file in it, where does the fmt taglib go?
Question #2:
Can the fmt:setBundle tag have a nested fmt:message tag?
Question #3:
Where does the message.properties file have to be located for use with the fmt:setBundle tag?
Answer #1:
If you are going to use fmt:message with fmt:setBundle and fmt:setLocale, you will need the fmt taglib. This is obvious I am sure. However, in addition, if you have a jsp file, that includes another jsp file, using the jsp:includes tag, and the included file is the one that contains the fmt tags, then the fmt taglib goes into the included file, and NOT in the wrapper file.
<%# taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
Answer #2:
I was unable to get the following to work. Eclipse said that the fmt:setBundle tag must be empty. However, I did see examples on the web that nested the fmt:message tag within open and close fmt:setBundle tags.
<fmt:setBundle basename="message">
<fmt:message key="name"/>
</fmt:setBundle>
See: https://www.baeldung.com/jstl
I WAS able to get the following to work.
<fmt:setLocale value="en_US" />
<fmt:setBundle basename="com.studypartner.properties.message" var="lang"/> // approach #1
<h1><fmt:message key="name" bundle="${lang}" /></h1>
<fmt:setBundle basename="message" var="lang"/> // approach #2
<h1><fmt:message key="name" bundle="${lang}" /></h1>
To make this code i18n, you can set the locale to whatever you want from the list of language_COUNTRY codes, and if you have a matching property file, the code above will print the value of key "name" to the page. For instance, I created a properties file called "message_en_US.properties". Since I set the locale to "en_US", and the end of the basename is "message", the properties file I have will be found and the key "name" that is in this file, that matches the fmt:message tag, will end up in the tag above. That part about "lang" in the tags above just seems to be necessary to link the bundle to the message.
See: https://www.tutorialspoint.com/jsp/jstl_format_message_tag.htm
Here's a list of language and country codes:
https://docs.oracle.com/cd/E13214_01/wli/docs92/xref/xqisocodes.html
Answer #3:
Ok, look at the code for "approach #1" and "approach #2" again, in Answer #2. Why did I repeat it? I wanted to prove that either approach will work. It seems that it is important to place the properties file in the correct location. However, in a Maven Spring 3 Java web project, you can locate it in a few surprising locations, and it will work for any of them. Take a look at the project setup in the link below:
project setup
First, if you don't have a message_en_US.properties file, but you do have a message.properties file, then the fmt:setBundle tag will still work. Also, you can place your properties file in 3 different places, and it will still work.
a) src/main/java > com.studypartner.properties
b) src/main/resources > com > studypartner > properties
c) src/main/resources
"a" and "b" work for
"c" works for
Where of course you would replace "com.studypartner.properties" with your own package name (a, b) or name of nested folders (c).
Basically, this is what they mean when they say that the properties file has to be on your "classpath".

Cannot add a third content field

I'm kinda new to typo, so maybe I am just missing something.
I'm trying to add a third content field to Typo3 4.5.
What I've done so far.
Edit my template and added a new block
Added the block via TemplatVoila > Update Mapping > Modify DS / TO with Element Preset "Page-Content Elements [Pos.: 0]
Mapped it to the new block in the template
But I am missing something as the new field isn't showing up in the Page edit screen.
EDIT: I've found the Block in the "Edit page properties" but how to show it on standard edit screen?
Any added content area will appear automatically in your TV-View-module. So if you dont see it in there, then
you may have duplicate fields names
wrong column positions
or the existing template is using a »beLayout«-section, which shows only the first two content areas (see example in reference http://docs.typo3.org/typo3cms/extensions/templavoila/ExtTemplavoila/StaticDataStructures/ExampleForBelayout/Index.html)
The TemplaVoila template is split into TS (TemplaVoilà Template Object) and DS (TemplaVoilà Data Structure) records, may you paste the content of the field „Data Structure XML“ of the DS record here? In there are all necessary information.
The two template files should be located in your general storage folder, your TypoScript root file should be there as well.

How can you debug a DITA transformation?

I know XSLT in general can be debugged, but how exactly would one go about debugging a DITA transformation, considering its modular XSLT structure and the fact that stylesheets are pointed to by the catalog.xml file?
I want to be able to step through the code during runtime, and be able to set break points, etc.
If you are using the Oxygen editor, you can debug Toolkit transforms using the technique described here (from the Oxygen 14.2 documentation):
Debugging PDF Transformations
To debug a DITA PDF transformation scenario using the XSLT Debugger follow these steps:
Go to Options > Preferences > XML > XML Catalog, click Add and select the file located at [Oxygen Install Directory]\ frameworks\dita\DITA-OT\plugins\org.dita.pdf2\cfg\catalog.xml;
Open the map in the DITA Maps Manager and create a DITA Map PDF transformation scenario;
Edit the scenario, go to the Parameters tab and change the value of the clean.temp parameter to no;
Run the transformation scenario;
Open in Oxygen XML the stage1.xml file located in the temporary directory and format and indent it;
Create a transformation scenario for this XML file by associating the topic2fo_shell.xsl stylesheet located at OXYGEN_INSTALL_DIR/frameworks/dita/DITA-OT/plugins/org.dita.pdf2/xsl/fo/topic2fo_shell_fop.xsl;
In the transformation scenario edit the Parameters list and set the parameter locale with the value en_GB and the parameter customizationDir.url to point either to your customization directory or to the default DITA OT customization directory. It's value should have an URL syntax like:file://c:/path/to/OXYGEN_INSTALL_DIR/frameworks/dita/DITA-OT/plugins/org.dita.pdf2/cfg.
Debug the transformation scenario.
I found this topic by searching for "debug toolkit" in the Oxygen online help.
These instructions are specifically for PDF, but you should be able to adapt these instructions to HTML-based transforms as well.
There is always the good old trick of adding print statements around in the code, which is xslt translates to <xsl:message>. Here is a snippet from my frontmatter transformation:
<!--
<xsl:message>createFrontMatter_1.0</xsl:message>
<xsl:message>artworkPrefix=<xsl:copy-of select="$artworkPrefix"/></xsl:message>
<xsl:message>customizationDir.url=<xsl:value-of select="$customizationDir.url"/></xsl:message>
<xsl:message>imageLogoPath=<xsl:value-of select="$imageLogoPath"/></xsl:message>
<xsl:message>imageNotePath=<xsl:value-of select="$imageNotePath"/></xsl:message>
<xsl:message>imageWatermarkPath=<xsl:value-of select="$imageWatermarkPath"/></xsl:message>
<xsl:message>page-width=<xsl:value-of select="$page-width"/></xsl:message>
<xsl:message>page-height=<xsl:value-of select="$page-height"/></xsl:message>
-->
If I uncomment this, I get a nice debugging block of text in the output log, showing the various values for the settings I use.