Posts by helderdarocha • 1,096 points
32 posts
-
1
votes2
answers508
viewsA: How to select an element that depends on another by Xpath
According to the XML structure you included above, the Xpath below selects the content of div within another div which is immediately preceded by a div containing a table with a cell containing a a…
xpathanswered helderdarocha 1,096 -
0
votes1
answer110
viewsA: How to use Foreach with xslt in an xml file
You can process the XML file using an XSLT processor to generate an HTML (via tool or server) or link using a processing instruction (which will be interpreted by the browser). To make this link,…
-
0
votes1
answer174
viewsA: Change 2 attributes of an XML with XSLT
If you add the second template in the first XSLT there is no error. What you should not do is simply add these two templates in the first XSLT, because there is ambiguity. The first of them copies…
-
1
votes1
answer379
viewsA: How do XSLT get the attributes inside the name, my item tag, only if it’s true?
Use a template to select all elements item, test content value (using . or node() or text()) and print the attribute value nome if the content is equal to the string 'true'. Here’s an example of a…
-
0
votes1
answer457
viewsA: Changing an attribute of an XML element
To replace the value of an attribute you first need to locate your element through an Xpath expression, which will be passed to the stylesheet template. I will assume that the selection is made by…
-
1
votes1
answer189
viewsA: D3.js shows nothing on the screen
If "meso.json" contains only the map of Brazil, it is likely that it is appearing yes, but outside the viewing area. By the geographical coordinates you are using (latitude 10, longitude 55) the…
-
1
votes1
answer43
viewsA: Pulse effect does not work properly when it has 2 elements
The transformation occurs, by default, in relation to the origin of SVG coordinates (SVG point 0.0 - top left corner). As the circle is not at the origin, you compensated by moving the origin during…
-
2
votes2
answers157
viewsA: Icon SVG created with Inkscape is not properly imported
Android Studio does not support the full SVG specification. But you can create simple graphs without gradients, filters, etc. using only simple figures and paths. <defs> is a SVG header block,…
-
2
votes1
answer183
viewsA: How to bring the content of a postgis query to a JSP page?
You should export your map as an open format that can be read in Java, such as Geojson or GML. You can generate the SVG on the server. For this you can turn GML into SVG (using XSLT +…
-
1
votes1
answer46
viewsA: Sankey D3.js problem diagram with large data
The D3 Sankey plugin uses position numeric (index) of the element in the array nodes for property source and target array links. In your example you are using names. You can pre-process the file…
d3.jsanswered helderdarocha 1,096 -
0
votes1
answer380
viewsA: Return to TEXT SVG line
You can break a line by creating another object <text> or using elements <tspan> varying the position (attribute) dy that is relative: <text x="10" y="20" fill="#000"…
-
3
votes2
answers4504
viewsA: How to read xml with c#
Here’s a basic demo using the W3C DOM and Xpath. You can include it in a method that gets the symbol (DOM is a bureaucratic API - if your problem is more complex it might be simpler if you use…
-
4
votes1
answer640
viewsA: Filter certain elements of an XML
You can use it Xpath. In Xpath you can express a path within an XML as a sequence of steps. Each step creates a context for the next step. The last step contains the elements you want to select.…
-
6
votes1
answer215
viewsA: println on Swift via terminal
A class is not a procedural structure and cannot contain sequence of instructions for execution unless they are within a method. The last two lines of code you posted refer to the use of the class…
-
1
votes2
answers520
viewsA: XSL does not enter the correct condition
It is difficult to offer a solution in XSLT without knowing the structure of the input data, and without knowing exactly the context in which the processing takes place, so this response is based on…
-
3
votes3
answers601
viewsA: Remove: from xml generated by my web service
The prefix a: before those elements declares that they belong to a namespace. This is not part of the element name. You cannot simply remove them without making changes to other parts of the file or…
-
1
votes1
answer304
viewsA: XSL read file names from a folder
The behavior of the browser is expected. You have included an XML document that contains the processing instruction <?xml-stylesheet...>, so the browser won’t show the XML structure as it…
-
4
votes1
answer128
viewsA: Javaweb with xhtml
With pure JSF you can use: <h:inputText value="#{cadastroDados.dataNascimento}"> <f:convertDateTime pattern="dd/MM/yyyy"/> </h:inputText> The pattern is the expected date pattern…
jsfanswered helderdarocha 1,096 -
1
votes2
answers1632
viewsA: How to get the <a> tag inside a <DIV, using XPATH?
The Xpath expression you are using returns all the elements that have attribute classworthwhile item: //*[@class='item'] It is a collection. Your code navigates through the items in this collection,…
-
4
votes2
answers784
viewsA: How to implement an SVG?
Actually the SVG you posted is not a simple circle. It is an object that contains a circle. It is important to distinguish this because if you are trying to position the circle, will not work unless…
-
4
votes3
answers1073
viewsA: C# update XML based on another XML
An alternative to using LINQ is to use XSLT transformation, which performs transformations into XML nodes using compiled templates. XSLT transformations use DOM and load XML into memory, but nodes…
-
1
votes1
answer179
viewsA: Problem in SVG image. Event mouseenter(), Mousemove() and mouseleave()
Since you didn’t include CSS or HTML, I’ll assume that SVG is any image, and you don’t have a predefined CSS. By your Javascript, you also have an image img. $('img').filter( ... ); I created a…
-
1
votes2
answers899
viewsA: how to view images with xsl with src from xml file img
The ideal is to select the element you want using a template that will be called recursively while document nodes are processed. The XSL document below does exactly what you want without using…
-
3
votes2
answers3548
viewsA: How to check if a directory exists in Java?
A directory can be represented by java.io.File, which has a method exists(). You can create an object File, and call the exists() in the form: File file = new File(caminho); if (file.exists()) { //…
javaanswered helderdarocha 1,096 -
4
votes1
answer115
viewsA: How to determine if a string value is in XML format?
You can check whether response.ContentType corresponds to application/xml or text/xml and use this information to make the decision. If the service is well configured, it should send this header…
-
4
votes4
answers1363
viewsA: How to change an element within a Less file?
If your LESS style sheet is being processed in the browser (and not sent as server CSS) you can change the variables in running time. The file will not be loaded again, but it will be recompiled.…
-
3
votes2
answers6870
viewsA: Jboss - "Unable to get Managed Connection for java:/Appds"
The most common cause for this type of error is that the bank no longer has connections to distribute. If you are releasing connections after use, it may be that some other part of your program or…
-
7
votes4
answers3497
viewsA: Capture the values of JSON that is Online
You already have the stream that is returned by openStream(). Just pass as argument from InputStreamReader: Reader reader = new InputStreamReader( url.openStream() );…
-
3
votes1
answer146
viewsA: When to use `for x in y`and when to use `each`
I think the other question already answers that, doesn’t it? The only difference between the two is that in the for the variable that is used to make the iteration continues in scope when the for…
rubyanswered helderdarocha 1,096 -
0
votes1
answer101
viewsA: How to restrict SAML 2.0’s Authentication Context XSD
All instances of the new type must also be valid for the base type. But in your schema it is possible to define a RestrictedPasswordType which does not have an attribute Length attribute…
-
8
votes4
answers77025
viewsA: How to run . jar with prompt?
To create an executable JAR it is necessary that the Manifest.mf of it enter the full name (package.Class) of the class containing the method main() which must be executed. Check if this is the…
-
2
votes5
answers436
viewsA: Refactoring: When is a method "too big"?
A general rule is that if a refactoring can make the code simpler, less complex, easier to understand and maintain, it should be done. The ideal is to create good abstractions, cohesive, with low…