inline:-

Vadim Gritsenko wrote:

>>From: David Crossley [mailto:[EMAIL PROTECTED]]
>>
>>Please do not give up, Ian. Cocoon can certainly do validation
>>as an XML framework now using DTDs. Perhaps later using other
>>schema (Relax NG anyone?).
>>
i'm currently investigating relaxng:-
- jing seems the validator to use, any probs?
- also relaxng has no way for docs to identify schema, any ideas?

>>
>>Vadim was just saying that it is not a "Concern" of Cocoon,
>>but that of the parser.
>>    
>>
>
>Yup.
> 
>  
>
>>We put a lot of work in six (?) months ago to ensure that
>>Cocoon could do validation. In fact, we had it working nicely
>>during build docs. However, then Bug 6200 was uncovered.
>>and we had to turn it off by default in cocoon.xconf
>>
>>Please help to get it available again. Can you add any insight
>>to the Bugzilla description?
>>http://nagoya.apache.org/bugzilla/show_bug.cgi?id=6200
>>
once this thread is exhausted, i'll post a summary, get an account and 
add my 2p if it helps

>>
>>This is definitely a capability that i, for one, want to see
>>in my XML Framework.
>>
>>Ian, you seem to be trying to trick the parser by supplying
>>malformed SYSTEM identifiers and fake DTDs. That will never work.
>>
i tried two things:-
1. doctype with no validity info
- i thought this was compliant but it seems not (i'm sure that 
systemid="" has workedforme in the past)
2 so i wrote an xslt script to generate an ANY decl for every element 
and a CDATA #IMPLIED for every attribute
- this is therefore the most minimum dtd necessary (not useful but 
*does* keep the parser happy)
- i did this for treeprocessor and the parser moved on to the next document

>>    
>>
>
>Agreed. I /discovered/ small tiny sentence in XML spec:
>
>http://www.w3.org/TR/REC-xml#dt-valid
>Definition: An XML document is valid if it has an associated document
>type declaration and if the document complies with the constraints
>expressed in it.
>
looks like validity info *must* be given, oh well...

>
>
>  
>
>>There is one way for small documents - add an internal DTD subset.
>>
internal/external no difference, it seems that if parser is in 
validating mode the only accepted minimum is an ANY decl for each 
element and a CDATA #IMPLIED for every attribute, how does the relative 
location of these change anything?

>>    
>>
>
>What about XSL files? From  http://www.w3.org/TR/xslt#dtd:
>... XML 1.0 DTDs do not support XML Namespaces and thus cannot correctly
>describe the allowed structure of an XSLT stylesheet
>
the w3c did a hack through param entities, iirc (can't remember which 
dtd though)

sure dtd's have no knowledge of namespaces, but through a param entity 
you could add a prefix to every element name

you'd have to hard code the prefix, using multiple namespaces would be 
grim...

i'm going to ditch dtd's, they are so crap :-(

>
>
>  
>
>>See for example cocoon.roles
>>
again the internal/external makes no difference, if the parser is 
validating then validity info must be given and the doc must conform

apparently it is the availability of the declarations that makes parsing 
this work, not the use of an internal subset

ian

>>    
>>
>
>PS I'm about to commit changes to treeprocessor-builtins.xml
>
>Vadim
>
>
>  
>
>>--David
>>    
>>
>
>
>
>---------------------------------------------------------------------
>Please check that your question  has not already been answered in the
>FAQ before posting.     <http://xml.apache.org/cocoon/faq/index.html>
>
>To unsubscribe, e-mail:     <[EMAIL PROTECTED]>
>For additional commands, e-mail:   <[EMAIL PROTECTED]>
>
>
>  
>



---------------------------------------------------------------------
Please check that your question  has not already been answered in the
FAQ before posting.     <http://xml.apache.org/cocoon/faq/index.html>

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

Reply via email to