forked from atsushieno/monodroid-schema-gen
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathREADME
51 lines (34 loc) · 1.76 KB
/
README
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
= What is this? =
monodroid-schema-gen is an Android layout.xml schema generator.
WARNING: Android layout xml does not fit well with XML schema restrictions.
XML Schema is not extensible enough to accept non-standard components nor
non-standard attributes which are (still) in android XML namespace (due to
the limitation of element/attribute wildcards). So, you CANNOT use the
resulting schema to VALIDATE your layout xml resources.
It should be used only for auto-complete element/attribute candidates.
It consists of three separate tools.
- type-hierarchy-importer.exe fetches android documentation for
android.view.View (i.e. View.html), parses the documents for all known
indirect subclasses of View as well as View itself, and outputs java-based
type hierarchy definitions.
It generates type-hierarchy.xml.
- gen-android-r-styleable.exe fetches android documentation for
android.R.styleable, which is in fact deprecated and does not exist in
android.jar (thus nor Mono.Android.dll), parses the document for all known
attributes in android namespace, and outputs the attributes list.
It generates all-known-attributes.xml.
- monodroid-schema-gen.exe parses Mono.Android.dll and all-known-attributes.xml
to generate schemas which reside in each namespace.
= Usage =
run below:
make MONO_ANDROID_DLL=/path/to/Mono.Android.dll
which should take all care.
This takes for a while, as attribute-doc-importer.exe retrieves ALL relevant
HTML documentation webpages from developer.android.com.
It will generate two schema files:
- android-layout-xml.xsd
- schemas.android.com.apk.res.android.xsd
That's all. Note that both are required to auto-complete layout.xml nodes.
= External Tool =
It uses SgmlReader: http://code.msdn.microsoft.com/SgmlReader.
Atsushi Eno