2 import java
.io
.FileOutputStream
;
3 import java
.io
.IOException
;
4 import java
.io
.OutputStream
;
6 import javax
.xml
.parsers
.DocumentBuilder
;
7 import javax
.xml
.parsers
.DocumentBuilderFactory
;
8 import javax
.xml
.parsers
.ParserConfigurationException
;
9 import javax
.xml
.transform
.Transformer
;
10 import javax
.xml
.transform
.TransformerConfigurationException
;
11 import javax
.xml
.transform
.TransformerException
;
12 import javax
.xml
.transform
.TransformerFactory
;
13 import javax
.xml
.transform
.dom
.DOMSource
;
14 import javax
.xml
.transform
.stream
.StreamResult
;
15 import javax
.xml
.transform
.stream
.StreamSource
;
17 import org
.apache
.xpath
.XPathAPI
;
18 import org
.w3c
.dom
.Document
;
19 import org
.w3c
.dom
.Node
;
20 import org
.w3c
.dom
.NodeList
;
21 import org
.xml
.sax
.SAXException
;
23 /** used to generate .tcl files from */
26 // Global value so it can be ref'd by the tree-adapter
27 static Document document
;
28 public static void main(String argv
[])
32 System
.err
.println("Usage: java Stylizer stylesheet xmlfile outputdir");
35 DocumentBuilderFactory factory
= DocumentBuilderFactory
.newInstance();
38 System
.err
.println("Starting conversion...");
40 File stylesheet
= new File(argv
[0]);
41 File datafile
= new File(argv
[1]);
42 DocumentBuilder builder
= factory
.newDocumentBuilder();
43 document
= builder
.parse(datafile
);
45 NodeList list
= XPathAPI
.selectNodeList(document
, "website/language/page");
47 for (int i
=0; i
<list
.getLength(); i
++)
49 Node node
=list
.item(i
);
51 // Use a Transformer for output
52 TransformerFactory tFactory
= TransformerFactory
.newInstance();
53 StreamSource stylesource
= new StreamSource(stylesheet
);
54 Transformer transformer
= tFactory
.newTransformer(stylesource
);
56 Node fileName
= XPathAPI
.selectSingleNode(node
, "outfile/text()");
58 System
.err
.println("Converting " + fileName
.getNodeValue());
59 DOMSource source
= new DOMSource(document
);
61 OutputStream output
=new FileOutputStream(new File(argv
[2], fileName
.getNodeValue()));
66 StreamResult result
= new StreamResult(output
);
68 transformer
.setParameter("pagetogenerate", fileName
.getNodeValue());
69 transformer
.transform(source
, result
);
76 } catch (TransformerConfigurationException tce
)
78 // Error generated by the parser
79 System
.out
.println("\n** Transformer Factory error");
80 System
.out
.println(" " + tce
.getMessage());
81 // Use the contained exception, if any
83 if (tce
.getException() != null)
84 x
= tce
.getException();
86 } catch (TransformerException te
)
88 // Error generated by the parser
89 System
.out
.println("\n** Transformation error");
90 System
.out
.println(" " + te
.getMessage());
91 // Use the contained exception, if any
93 if (te
.getException() != null)
94 x
= te
.getException();
96 } catch (SAXException sxe
)
98 // Error generated by this application
99 // (or a parser-initialization error)
101 if (sxe
.getException() != null)
102 x
= sxe
.getException();
104 } catch (ParserConfigurationException pce
)
106 // Parser with specified options can't be built
107 pce
.printStackTrace();
108 } catch (IOException ioe
)
111 ioe
.printStackTrace();
Linking to existing account procedure
If you already have an account and want to add another login method
you
MUST first sign in with your existing account and
then change URL to read
https://review.openocd.org/login/?link
to get to this page again but this time it'll work for linking. Thank you.
SSH host keys fingerprints
1024 SHA256:YKx8b7u5ZWdcbp7/4AeXNaqElP49m6QrwfXaqQGJAOk gerrit-code-review@openocd.zylin.com (DSA)
384 SHA256:jHIbSQa4REvwCFG4cq5LBlBLxmxSqelQPem/EXIrxjk gerrit-code-review@openocd.org (ECDSA)
521 SHA256:UAOPYkU9Fjtcao0Ul/Rrlnj/OsQvt+pgdYSZ4jOYdgs gerrit-code-review@openocd.org (ECDSA)
256 SHA256:A13M5QlnozFOvTllybRZH6vm7iSt0XLxbA48yfc2yfY gerrit-code-review@openocd.org (ECDSA)
256 SHA256:spYMBqEYoAOtK7yZBrcwE8ZpYt6b68Cfh9yEVetvbXg gerrit-code-review@openocd.org (ED25519)
+--[ED25519 256]--+
|=.. |
|+o.. . |
|*.o . . |
|+B . . . |
|Bo. = o S |
|Oo.+ + = |
|oB=.* = . o |
| =+=.+ + E |
|. .=o . o |
+----[SHA256]-----+
2048 SHA256:0Onrb7/PHjpo6iVZ7xQX2riKN83FJ3KGU0TvI0TaFG4 gerrit-code-review@openocd.zylin.com (RSA)