Re: Latest FO Schema Improved

2002-05-15 Thread Chuck Paussa

OK, done in my copy. I'll post it again next week

simpleType name = border_margin_width_Type
!-- fo:width_Type{1,4} fo:inherit_Type --
xs:restriction
xs:simpleType
xs:list
xs:simpleType
union memberTypes=fo:width_Type 
fo:positive_length_Type/
/xs:simpleType
/xs:list
/xs:simpleType
xs:minLength value=1 /
xs:maxLength value=4 /
/xs:restriction
/simpleType

Chuck

Oleg Tkachenko wrote:

 Hello!

 Another problem: border-width doesn't understand 1px value, my 
 proposal is to extend border_margin_width_Type to allow non negative 
 length values:

  simpleType name=border_margin_width_Type
 restriction
   simpleType
 list
   simpleType
 union memberTypes=fo:width_Type 
 fo:non-negative-length_Type/
   /simpleType
 /list
   /simpleType
   minLength value=1/
   maxLength value=4/
 /restriction
 !-- fo:width_Type{1,4} fo:inherit_Type --
   /simpleType

 Where non-negative-length_Type is defined as

 !-- A non negative signed length value where a 'length' is a real 
 number plus a unit qualification. A property may define additional 
 constraints on the value. --
   simpleType name=non-negative-length_Type
 restriction base=NMTOKEN
   pattern value=[+]?\d+\.?\d*(px|pt|mm|cm|in|em)/
 /restriction
   /simpleType






-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]




Re: Latest FO Schema Improved

2002-05-14 Thread Chuck Paussa

Oleg,

Oleg Tkachenko wrote:
  P.S. I believe full-fledged fo schema would be a very useful thing. 
Would you mind if I contribute to this project?
You just did contribute. Thanks. I'll include your change (and any 
others anyone sends me) in the next draft. I'll post it next week to 
give other people time to respond.

I've got nothing in my own FO documents that even come close to 
exercising the full spec. If we want to develop a full-fledged and 
validated schema, I'll need contributions from people who have a real 
need to validate complex documents.

Chuck

Oleg Tkachenko wrote:
  Hello!
 
  Chuck Paussa wrote:
  I've improved the FO schema adding much better type patterns and 
adding a bunch of attributes that I'd missed the first time around.
 
  Well done! I tried to validate my fo documents and the first 
validation error I got was about fo:declarations content - I have some 
meta info there in my namespace. Spec says:
  ---
  Contents:
  (color-profile)+
 
  The fo:declarations flow object may have additional child elements in 
a non-XSL namespace. Their presence
  does not, however, change the semantics of the XSL namespace objects 
and properties. The permitted
  structure of these non-XSL namespace elements is defined for their 
namespace(s).
  
 
  So, I suppose, schema declaration for the element should be as follows:
 
  xs:element name=declarations
  xs:complexType
xs:sequence
  xs:element ref=fo:color-profile maxOccurs=unbounded/
  xs:any minOccurs=0 maxOccurs=unbounded 
namespace=##other processContents=skip/
 /xs:sequence
xs:attributeGroup ref=fo:inheritable_properties_List/
  /xs:complexType
/xs:element
 
  btw, this declaration assumes that all fo:color-profile elements 
must come before other stuff, which is not required by spec, but I 
cannot see any way to express such constraints in schema, one could use 
xs:choice instead of xs:sequence, but this way we lose control over 
(color-profile)+ constraint.




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]