[
Lists Home |
Date Index |
Thread Index
]
Most of your constraints are not regular structural constraints. XML
Schemas does not operate at that kind of level well.
The Schematron schema language layers on top of XML Schemas. It can let
you report such things as
* the king is in check
* the king has no position to go to where he is not also in check
* after a move, a rook must be either in the same place, or taken,
or in one of the 2+1 jump positions, or swapped with the king
plus the constraints you mention
* not allowing two allied bishops on the same colour (oh, HOW?)
* Only exactly one King per side (done)
* Maximum number of piece types, alowing for promotion (yep)
* pawns dont get to go to home (done)
Cheers
Rick Jelliffe
Jon IV Thompson Coon said:
>> You need to be a lot more specific about what information you want to
>> represent. The state of a game (where the pieces are)? The history of a
>> game (how the pieces got there)? An analysis of the game?
>
> I was being vague, because I was backhandedly asking permission to present
> my puny problem first...
>
> Very possibly I've got my apples and oranges (and my metaphores) mixed up
> here, but I don't really want to model the rules of the board, just these
> sort of obvious impossibilities:
>
> - not allowing two allied bishops on the same colour (oh, HOW?)
> - Only exactly one King per side (done)
> - Maximum number of piece types, alowing for promotion (yep)
> - pawns dont get to go to home (done)
>
> Questions like "how, and can, a Knight move here" are not an issue.
>
> On the other hand these are:
>
> - making sure every other square on the board is going to be black
> (this i'm fighting with, and giving up)
> - pieces don't occupy the same square (uniqueness with coordinates?)
>
>
> The board representation thingie is annoying me. If I make sure that every
> square is represented in the document and within a square there is at
> maximum one piece, everything else becomes a hazzle. How do I check for
> "one
> king" or "less than nine pawns", this is what i can't get my head around.
>
> and of course checking for the sameness of bishops
>
> So there is either the possibility of forcing the whole board to be
> present
> in the document or the more sensible method of just presenting the pieces
> with their coordinates. Unfortunately I'm required to do it the first way
> unless i can somehow mathematicise within the schema to force the b/w grid
> unto the creator of the xml document?
>
>
> Jon Thompson Coon
>
> -----------------------------------------------------------------
> The xml-dev list is sponsored by XML.org <http://www.xml.org>, an
> initiative of OASIS <http://www.oasis-open.org>
>
> The list archives are at http://lists.xml.org/archives/xml-dev/
>
> To subscribe or unsubscribe from this list use the subscription
> manager: <http://www.oasis-open.org/mlmanage/index.php>
>
>
|