[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-devel
Subject:    Krazy XML file validation
From:       Parker Coates <parker.coates () gmail ! com>
Date:       2009-03-01 2:22:29
Message-ID: 85d347350902281822t48c11fe8nae2db83d9586f2cb () mail ! gmail ! com
[Download RAW message or body]

Hello folks,

The EBN recently added the validation of XML files to the list of
Krazy checks. Two such issues showed up in Killbots, but I'm not sure
either one is a real problem with my sources. I'm not very familiar
with XML, so it could be that I'm missing something.

The first issue is that killbotsui.rc fails to validate against
kxmlgui.xsd. I get an error [1] stating problems with the "gui"
element. Looking around I've noticed that some apps use a "kpartgui"
element for the root of the document instead of "gui", but neither
seems to validate. In fact, I can't find a single ui.rc file that does
validate.

The second issue is the with the "choices" element in killbots.kcfg. I
have two different config entries that share a single enumeration. [2]
This arrangement works quite well in the program, but xmllint
complains about that the second "choices" element doesn't contain any
"choice" elements. Repeating the "choice" elements from the first
entry causes the XML to validate, but causes the kconfig_compiler to
produce non compilable sources. Adding minOccurs="0" to the "choice"
element in kcfg.xsd makes the validation pass, but, again, I know next
to nothing about XML, so I'm not sure if this is correct.

Anyone more knowledgeable care to shed some light on things for me?

Parker


[1]
killbotsui.rc:2: element gui: Schemas validity error : Element 'gui':
No matching global declaration available for the validation root.
killbotsui.rc fails to validate

[2]
		<entry name="MiddleClickAction" type="Enum">
			<choices name="ClickAction">
				<choice name="Nothing"/>
				<choice name="Step"/>
				<choice name="RepeatedStep"/>
				<choice name="Teleport"/>
				<choice name="TeleportSafely"/>
				<choice name="TeleportSafelyIfPossible"/>
				<choice name="WaitOutRound"/>
			</choices>
			<default>RepeatedStep</default>
			<tooltip>The action performed on a middle-click</tooltip>
			<whatsthis>Selects the action performed when middle-clicking on the
main game area. If a middle mouse button is not available, this action
can be performed by left- and right-clicking simultaneously or by
left-clicking while holding the control key.</whatsthis>
		</entry>
		<entry name="RightClickAction" type="Enum">
			<choices name="ClickAction"/>
			<default>TeleportSafelyIfPossible</default>
			<tooltip>The action performed on a right-click</tooltip>
			<whatsthis>Selects the action performed when right-clicking on the
main game area.</whatsthis>
		</entry>
 
>> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic