jira.codehaus.org

  • Log In Access more options
    • Online Help
    • Keyboard Shortcuts
    • About JIRA
    • JIRA Credits
    • What?s New
  • Dashboards Access more options (Alt+d)
  • Projects Access more options (Alt+p)
  • Issues Access more options (Alt+i)
  • Maven Doxia
  • DOXIA-136

Create an FML DTD or XSD

  • Log In
  • Views
    • XML
    • Word
    • Printable

Details

  • Type: Task Task
  • Status: Closed Closed
  • Priority: Major Major
  • Resolution: Fixed
  • Affects Version/s: None
  • Fix Version/s: 1.1
  • Component/s: Module - Fml
  • Labels:
    None

Description

Review the M1 FAQ schema is certainly a good start.

http://maven.apache.org/maven-1.x/plugins/faq/faq.xsd

  • Options
    • Sort By Name
    • Sort By Date
    • Ascending
    • Descending
    • Download All

Attachments

  1. File
    DOXIA-136.diff
    04/Oct/07 4:58 AM
    2 kB
    Herve Boutemy

Issue Links

depends upon

Improvement - An improvement or enhancement to an existing feature or task. MODELLO-49 Support for xml.attribute and xml.listStyle="flat" is missing in xsd plugin

  • Major - Major loss of function.
  • Closed - The issue is considered finished, the resolution is correct. Issues which are not closed can be reopened.
is depended upon by

Sub-task - The sub-task of the issue DOXIA-141 Add missing references for FML XDOC

  • Major - Major loss of function.
  • Closed - The issue is considered finished, the resolution is correct. Issues which are not closed can be reopened.

New Feature - A new feature of the product, which has yet to be developed. DOXIA-263 Improve validation of input documents

  • Major - Major loss of function.
  • Closed - The issue is considered finished, the resolution is correct. Issues which are not closed can be reopened.
is related to

Bug - A problem which impairs or prevents the functions of the product. DOXIA-209 FAQ section without question ends up in NPE

  • Critical - Crashes, loss of data, severe memory leak.
  • Closed - The issue is considered finished, the resolution is correct. Issues which are not closed can be reopened.

Activity

Ascending order - Click to sort in descending order
  • All
  • Comments
  • Work Log
  • History
  • Activity
Hide
Permalink
Vincent Siveton added a comment - 10/Aug/07 6:35 AM

Should be with modello

Show
Vincent Siveton added a comment - 10/Aug/07 6:35 AM Should be with modello
Hide
Permalink
Vincent Siveton added a comment - 21/Aug/07 8:05 AM

Added modello stuff in r568106

Show
Vincent Siveton added a comment - 21/Aug/07 8:05 AM Added modello stuff in r568106
Hide
Permalink
Lukas Theussl added a comment - 02/Sep/07 9:58 AM

We need to publish fml-1.0.0.xsd at http://maven.apache.org/xsd/, as it's referenced in the mdo file.

Show
Lukas Theussl added a comment - 02/Sep/07 9:58 AM We need to publish fml-1.0.0.xsd at http://maven.apache.org/xsd/, as it's referenced in the mdo file.
Hide
Permalink
Lukas Theussl added a comment - 05/Sep/07 3:27 AM

I am afraid our current modello-generated xsd is unusable, I couldn't validate any fml with it. One problem is the default namespace that is generated (that's maybe fixed in modello-1.0-alpha-15 with MODELLO-46), the other is that all attributes are written out as elements in the xsd (see MODELLO-49). We can't publish it like that, so I propose to move this issue to a later release.

Show
Lukas Theussl added a comment - 05/Sep/07 3:27 AM I am afraid our current modello-generated xsd is unusable, I couldn't validate any fml with it. One problem is the default namespace that is generated (that's maybe fixed in modello-1.0-alpha-15 with MODELLO-46), the other is that all attributes are written out as elements in the xsd (see MODELLO-49). We can't publish it like that, so I propose to move this issue to a later release.
Hide
Permalink
Dennis Lundberg added a comment - 05/Sep/07 10:53 AM

Pushing it to a later release is fine by me.

Show
Dennis Lundberg added a comment - 05/Sep/07 10:53 AM Pushing it to a later release is fine by me.
Hide
Permalink
Herve Boutemy added a comment - 04/Oct/07 4:58 AM

I just fixed MODELLO-49
With the patch provided, 3 problems are away:

  • XML attributes
  • flat list
  • namespace

There is still one problem to validate existing test.fml: answers contain HTML code not enclosed with <![CDATA[...]]>, which is not supported by the simple xs:string type generated.
I have to find a way to support that.
Any thoughts?

Show
Herve Boutemy added a comment - 04/Oct/07 4:58 AM I just fixed MODELLO-49 With the patch provided, 3 problems are away:
  • XML attributes
  • flat list
  • namespace
There is still one problem to validate existing test.fml: answers contain HTML code not enclosed with <![CDATA[...]]>, which is not supported by the simple xs:string type generated. I have to find a way to support that. Any thoughts?
Hide
Permalink
David Roussel added a comment - 04/Oct/07 5:55 AM

Herve,

You can use the XML Schema any tag to define a wildcard

See: http://www.xml.com/pub/a/2002/11/20/schemas.html?page=4#wildcards

Given that most people won't be using namespaces with their XML, then you should allow any namespace in the any tag.

e.g.

<xs:element name="answer">
  <xs:complexType>
    <xs:sequence>
      <xs:element name="blah" type="xs:string"/>
      <xs:any minOccurs="0" processContents="skip" namespace="##other" />
    </xs:sequence>
  </xs:complexType>
</xs:element>
Show
David Roussel added a comment - 04/Oct/07 5:55 AM Herve, You can use the XML Schema any tag to define a wildcard See: http://www.xml.com/pub/a/2002/11/20/schemas.html?page=4#wildcards Given that most people won't be using namespaces with their XML, then you should allow any namespace in the any tag. e.g.
<xs:element name="answer">
  <xs:complexType>
    <xs:sequence>
      <xs:element name="blah" type="xs:string"/>
      <xs:any minOccurs="0" processContents="skip" namespace="##other" />
    </xs:sequence>
  </xs:complexType>
</xs:element>
Hide
Permalink
Herve Boutemy added a comment - 04/Oct/07 11:02 AM

Thanks David

Maven 1 faq.xsd contains:

<xsd:complexType mixed="true">
    <xsd:sequence>
        <xsd:any namespace="##any" processContents="lax" minOccurs="0" maxOccurs="unbounded" /> 
    </xsd:sequence>
    <xsd:anyAttribute namespace="##other" processContents="lax" /> 
</xsd:complexType>

How does it compare to your proposal?

Then the other question is: how to represent it in fml.mdo?
Actually, answer is coded as:

<field>
  <name>answer</name>
  <type>String</type>
  ...
</field>

Should it be transformed to:

<field>
  <name>answer</name>
  <type>XML</type>
  ...
</field>

or

<field xml.stringAsXml="true">
  <name>answer</name>
  <type>String</type>
  ...
</field>

or ... ?

Show
Herve Boutemy added a comment - 04/Oct/07 11:02 AM Thanks David Maven 1 faq.xsd contains:
<xsd:complexType mixed="true">
    <xsd:sequence>
        <xsd:any namespace="##any" processContents="lax" minOccurs="0" maxOccurs="unbounded" /> 
    </xsd:sequence>
    <xsd:anyAttribute namespace="##other" processContents="lax" /> 
</xsd:complexType>
How does it compare to your proposal? Then the other question is: how to represent it in fml.mdo? Actually, answer is coded as:
<field>
  <name>answer</name>
  <type>String</type>
  ...
</field>
Should it be transformed to:
<field>
  <name>answer</name>
  <type>XML</type>
  ...
</field>
or
<field xml.stringAsXml="true">
  <name>answer</name>
  <type>String</type>
  ...
</field>
or ... ?
Hide
Permalink
David Roussel added a comment - 05/Oct/07 4:58 AM

The maven1 faq.xsd looks good, go with that, since I just made mine up as an example, where-as I imagine the maven1 faq.xsd has been tested.

I don't know about modelo, so no comment.

Show
David Roussel added a comment - 05/Oct/07 4:58 AM The maven1 faq.xsd looks good, go with that, since I just made mine up as an example, where-as I imagine the maven1 faq.xsd has been tested. I don't know about modelo, so no comment.
Hide
Permalink
Vincent Siveton added a comment - 10/Oct/08 5:13 AM

I added xsd files in r703144

Show
Vincent Siveton added a comment - 10/Oct/08 5:13 AM I added xsd files in r703144
Hide
Permalink
Benjamin Bentmann added a comment - 02/Nov/08 12:17 PM

As for a review of the XSD: One could try to create unit tests that
a) use a couple of interesting example documents as input which we know are valid
b) push these documents through an XML parser in validating mode which employs the XSD
If the sample documents pass the validation, we have some assurance that the XSD captures the intended structure.

Show
Benjamin Bentmann added a comment - 02/Nov/08 12:17 PM As for a review of the XSD: One could try to create unit tests that a) use a couple of interesting example documents as input which we know are valid b) push these documents through an XML parser in validating mode which employs the XSD If the sample documents pass the validation, we have some assurance that the XSD captures the intended structure.
Hide
Permalink
Herve Boutemy added a comment - 10/Dec/08 5:31 AM

working on Modello, I found the feature we needed to handle HTML code not enclosed with {{<![CDATA[...]]>}}: it's <type>DOM</type>

Show
Herve Boutemy added a comment - 10/Dec/08 5:31 AM working on Modello, I found the feature we needed to handle HTML code not enclosed with {{<![CDATA[...]]>}}: it's <type>DOM</type>

People

  • Assignee:
    Vincent Siveton
    Reporter:
    Vincent Siveton
Vote (0)
Watch (2)

Dates

  • Created:
    17/Jul/07 7:41 AM
    Updated:
    10/Dec/08 5:31 AM
    Resolved:
    10/Oct/08 5:13 AM
  • Atlassian JIRA (v5.0.4#731-sha1:3aa7374)
  • Report a problem
  • Powered by a free Atlassian JIRA open source license for Codehaus. Try JIRA - bug tracking software for your team.