Open
Bug 69542
Opened 24 years ago
Updated 2 years ago
standalone xul validator
Categories
(Core :: XUL, enhancement, P3)
Core
XUL
Tracking
()
NEW
Future
People
(Reporter: alecf, Unassigned)
Details
Attachments
(3 files)
I am writing a little perl script that uses the XML::Parse module to examine XUL
files and look for bad patterns.
Some things I've been thinking about:
- event handlers inside templates
- unlocalized text (i.e. <text value="<text>">
I'm looking for other suggestions, so I've cc'ed a few people who might have
good ideas..
Comment 1•24 years ago
|
||
Html-namespaced elements (but I don't think we have many of those anymore)?
Needless tag complexity (<script src="..."></script> instead of <script
src="..."/>)?
Invalid xml comment types (seems we don't complain about /* foo */, although
that really should be the role of the xml parser)?
Just some thoughts.
Comment 2•24 years ago
|
||
(Hixie point out that /* foo */ is valid in xml, but just plain
text...nevermind about that last point)
Comment 3•24 years ago
|
||
Hard coded style (at least as a warning). e.g.,
<myelement value="foo" style="border:1px solid green;"/>
Comment 4•24 years ago
|
||
language="JavaScript" instead of type="text/javascript" ;-)
On top of html-namespaced elements, add unnecessary namespace declarations.
Reporter | ||
Comment 5•24 years ago
|
||
all great ideas! here is a bit of sample output from what I have so far:
./content/navigator/navigator.xul Line 220, Column 14: event handler oncommand=
inside of template, in <menuitem>
</menupopup>
</rule>
<rule>
<menupopup>
<menuitem class="menuitem-iconic bookmarkitem" uri="rdf:*"
=============^
value="rdf:http://home.netscape.com/NC-rdf#Name"
oncommand="OpenBookmarkURL(event.target,document.getElementById('BookmarksMenu').database)"
/>
</menupopup>
</rule>
./content/navigator/navigator.xul Line 236, Column 6: inline style in element
<box>
<box id="innermostBox" flex="1" style="min-width: 1px;"
context="contextual"
=====^
Status: NEW → ASSIGNED
Priority: -- → P3
Target Milestone: --- → mozilla0.9
Reporter | ||
Comment 6•24 years ago
|
||
erm, these are two tools i use for other stuff. output should have grepable
strings for deprecated, warning, error, ...
Comment 10•24 years ago
|
||
Why re-invent the wheel? Do you have a DTD for XUL? Then......
Comment 11•24 years ago
|
||
no dtd for xul is forthcoming. a validator would happen years sooner.
Comment 12•24 years ago
|
||
Ok, then I need to make one myself, based on the fourth draft of the XUL PRM. I
only can check if a XUL document is wellformed and that's not what I need.
I want to integrate a XUL DTD into my XUL Generator, so I can auto-validate
while I'm writing XUL documents (a la HomeSite).
Comment 13•24 years ago
|
||
it should be noted that someone recently mentioned that the w3 was likely to
abandon dtd's in favor of schemas (i think the conclusion was that XML dtd's
are useless). however this is only my understanding, i could be wrong.
Reporter | ||
Updated•24 years ago
|
Target Milestone: mozilla0.9 → mozilla1.0
Comment 14•24 years ago
|
||
We'll gladly add it to Komodo to do background syntax checking of XUL documents.
One feature request -- put both beginning and end column numbers in your output,
to make it easier to determine what bits of text to underline.
On the topic of schemas, in the absence of DTDs we have developed our 'own'
schema-like system for XSL linting. We could do something like that for XUL
support as well. DTDs or official schemas would be better, but i'm not holding
my breath. If you want more details, let me know.
Comment 15•24 years ago
|
||
nav triage team:
Cool beans, but not a ns ship stopper, for sure. marking nsbeta1- to get off
triage radar
Keywords: nsbeta1-
Comment 16•23 years ago
|
||
Bugs targeted at mozilla1.0 without the mozilla1.0 keyword moved to mozilla1.0.1
(you can query for this string to delete spam or retrieve the list of bugs I've
moved)
Target Milestone: mozilla1.0 → mozilla1.0.1
![]() |
||
Comment 17•23 years ago
|
||
Now that the release notes say that the "last of the XUL 1.0 syntax changes have
landed", would it be realistic to create an XUL 1.0 DTD?
OS: Linux → All
Hardware: PC → All
Reporter | ||
Updated•23 years ago
|
Target Milestone: mozilla1.0.1 → Future
Comment 18•18 years ago
|
||
Renaming for clarity. Also, assignee, how bitrotten are the attachments? Do you intend to continue work on a validator?
Severity: normal → enhancement
Summary: xul validator → standalone xul validator
Component: XP Toolkit/Widgets: XUL → XUL
QA Contact: scc → xptoolkit.widgets
Comment 19•3 years ago
|
||
The bug assignee is inactive on Bugzilla, so the assignee is being reset.
Assignee: alecf → nobody
Status: ASSIGNED → NEW
Updated•2 years ago
|
Severity: normal → S3
You need to log in
before you can comment on or make changes to this bug.
Description
•