|
View:
New views
10 Messages
—
Rating Filter:
Alert me
|
|
|
[jira] Created: (MODELLO-85) Allow an element to have a text and attributes at the same timeAllow an element to have a text and attributes at the same time
--------------------------------------------------------------- Key: MODELLO-85 URL: http://jira.codehaus.org/browse/MODELLO-85 Project: Modello Issue Type: New Feature Components: modello-plugin-xml, modello-plugin-xpp3, modello-test Affects Versions: 1.0-alpha-15 Reporter: Franz Allan Valencia See h2. What is currently supported According to Emmanuel, the following xml snippets are supported {code:xml} <fieldVar attVar="attValue"/> {code} {code:xml} <fieldVar>some text</fieldVar> {code} {code:xml} <fieldVar attVar="attValue"> <param>some text</param> </fieldVar> is supported {code} h2. What is currently not supported or at least, it does not seem to be supported is {code:xml} <fieldVar attVar="attValue">some text</fieldVar> {code} h2. Proposed Solution Thus, this leads me to my initial proposal of adding an "xml.classText" of type boolean to the field metadata. With xml.classText, an xml snippet such as this... {code:xml} <someField>some field value</someField> {code} may be represented by {code:xml} <model> ... <classes> ... <class> <name>someField</name> ... <field xml.classText="true"> <name>anyName</name> <version>4.0.0</version> <type>String</type> </field> </class> </classes> </model> {code} Notet that "someField" here is actually a class that has a field variable declared as "anyName". {code} public class SomeField { private String anyName; public String getAnyName() { return anyName; } public void setAnyName( String anyName ) { this.anyName = anyName; } } {code} Thus, we can now represent the earlier ( unsupported ) example {code:xml} <fieldVar attVar="attValue">some text</fieldVar> {code} With {code:xml} <model> ... <classes> ... <class> <name>fieldVar</name> ... <field xml.attribute="true"> <name>attVar</name> <version>4.0.0</version> <type>String</type> </field> <field xml.classText="true"> <name>anyNameAgain</name> <version>4.0.0</version> <type>String</type> </field> </class> </classes> </model> {code} h2. WDYT? Note that this is just my initial proposal. I am not sure what is the best solution to this. Any comments and suggestions would be greatly appreciated :-) -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira --------------------------------------------------------------------- To unsubscribe from this list please visit: http://xircles.codehaus.org/manage_email |
|
|
[jira] Updated: (MODELLO-85) Allow an element to have a text and attributes at the same time[ http://jira.codehaus.org/browse/MODELLO-85?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Franz Allan Valencia See updated MODELLO-85: -------------------------------------------- Attachment: MODELLO-85-modello.patch MODELLO-85-modello.patch changes * modello-plugin-xml ** Added a boolean field "classText" ( plus isClassText() and setClassText(...) ) to XmlFieldMetadata and allowed XmlMetadataPlugin to set this field ( via the field attribute "xml.classText" ) * modello-plugin-xpp3 ** Modified Xpp3ReaderGenerator and Xpp3WriterGenerator to understand a text element with attribtues using the XmlFieldMetadata's classText. ( _Note: If a class has a field with classText set to "true", its non-attribute fields will not be honored. Right now, these non-attribute fields are simply ignored._ ) * modello-test ** Modified the test to allow verifiers to be in different directories. > Allow an element to have a text and attributes at the same time > --------------------------------------------------------------- > > Key: MODELLO-85 > URL: http://jira.codehaus.org/browse/MODELLO-85 > Project: Modello > Issue Type: New Feature > Components: modello-plugin-xml, modello-plugin-xpp3, modello-test > Affects Versions: 1.0-alpha-15 > Reporter: Franz Allan Valencia See > Attachments: MODELLO-85-modello.patch > > > h2. What is currently supported > According to Emmanuel, the following xml snippets are supported > {code:xml} > <fieldVar attVar="attValue"/> > {code} > {code:xml} > <fieldVar>some text</fieldVar> > {code} > {code:xml} > <fieldVar attVar="attValue"> > <param>some text</param> > </fieldVar> is supported > {code} > h2. What is currently not supported > or at least, it does not seem to be supported is > {code:xml} > <fieldVar attVar="attValue">some text</fieldVar> > {code} > h2. Proposed Solution > Thus, this leads me to my initial proposal of adding an "xml.classText" of type boolean to the field metadata. > With xml.classText, an xml snippet such as this... > {code:xml} > <someField>some field value</someField> > {code} > may be represented by > {code:xml} > <model> > ... > <classes> > ... > <class> > <name>someField</name> > ... > <field xml.classText="true"> > <name>anyName</name> > <version>4.0.0</version> > <type>String</type> > </field> > </class> > </classes> > </model> > {code} > Notet that "someField" here is actually a class that has a field variable declared as "anyName". > {code} > public class SomeField > { > private String anyName; > public String getAnyName() > { > return anyName; > } > public void setAnyName( String anyName ) > { > this.anyName = anyName; > } > } > {code} > Thus, we can now represent the earlier ( unsupported ) example > {code:xml} > <fieldVar attVar="attValue">some text</fieldVar> > {code} > With > {code:xml} > <model> > ... > <classes> > ... > <class> > <name>fieldVar</name> > ... > <field xml.attribute="true"> > <name>attVar</name> > <version>4.0.0</version> > <type>String</type> > </field> > <field xml.classText="true"> > <name>anyNameAgain</name> > <version>4.0.0</version> > <type>String</type> > </field> > </class> > </classes> > </model> > {code} > h2. WDYT? > Note that this is just my initial proposal. I am not sure what is the best solution to this. Any comments and suggestions would be greatly appreciated :-) -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira --------------------------------------------------------------------- To unsubscribe from this list please visit: http://xircles.codehaus.org/manage_email |
|
|
[jira] Commented: (MODELLO-85) Allow an element to have a text and attributes at the same time[ http://jira.codehaus.org/browse/MODELLO-85?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_93095 ] Franz Allan Valencia See commented on MODELLO-85: ------------------------------------------------- Note: MODELLO-85-modello.patch also includes updated test cases > Allow an element to have a text and attributes at the same time > --------------------------------------------------------------- > > Key: MODELLO-85 > URL: http://jira.codehaus.org/browse/MODELLO-85 > Project: Modello > Issue Type: New Feature > Components: modello-plugin-xml, modello-plugin-xpp3, modello-test > Affects Versions: 1.0-alpha-15 > Reporter: Franz Allan Valencia See > Attachments: MODELLO-85-modello.patch > > > h2. What is currently supported > According to Emmanuel, the following xml snippets are supported > {code:xml} > <fieldVar attVar="attValue"/> > {code} > {code:xml} > <fieldVar>some text</fieldVar> > {code} > {code:xml} > <fieldVar attVar="attValue"> > <param>some text</param> > </fieldVar> is supported > {code} > h2. What is currently not supported > or at least, it does not seem to be supported is > {code:xml} > <fieldVar attVar="attValue">some text</fieldVar> > {code} > h2. Proposed Solution > Thus, this leads me to my initial proposal of adding an "xml.classText" of type boolean to the field metadata. > With xml.classText, an xml snippet such as this... > {code:xml} > <someField>some field value</someField> > {code} > may be represented by > {code:xml} > <model> > ... > <classes> > ... > <class> > <name>someField</name> > ... > <field xml.classText="true"> > <name>anyName</name> > <version>4.0.0</version> > <type>String</type> > </field> > </class> > </classes> > </model> > {code} > Notet that "someField" here is actually a class that has a field variable declared as "anyName". > {code} > public class SomeField > { > private String anyName; > public String getAnyName() > { > return anyName; > } > public void setAnyName( String anyName ) > { > this.anyName = anyName; > } > } > {code} > Thus, we can now represent the earlier ( unsupported ) example > {code:xml} > <fieldVar attVar="attValue">some text</fieldVar> > {code} > With > {code:xml} > <model> > ... > <classes> > ... > <class> > <name>fieldVar</name> > ... > <field xml.attribute="true"> > <name>attVar</name> > <version>4.0.0</version> > <type>String</type> > </field> > <field xml.classText="true"> > <name>anyNameAgain</name> > <version>4.0.0</version> > <type>String</type> > </field> > </class> > </classes> > </model> > {code} > h2. WDYT? > Note that this is just my initial proposal. I am not sure what is the best solution to this. Any comments and suggestions would be greatly appreciated :-) -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira --------------------------------------------------------------------- To unsubscribe from this list please visit: http://xircles.codehaus.org/manage_email |
|
|
[jira] Commented: (MODELLO-85) Allow an element to have a text and attributes at the same time[ http://jira.codehaus.org/browse/MODELLO-85?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_118135 ] Dennis Lundberg commented on MODELLO-85: ---------------------------------------- This would be a very interesting addition to modello, in my opinion. I've had a look at the patch, but unfortunately it is very hard to see which of all the changes are necessary. Here are a couple of reasons for this: - The patch introduces tab characters instead of spaces in many places - Parts of the code has been reformatted (new line breaks inserted) - Indentation has changed in several places If a new patch was provided that doesn't have these issues I'd be happy to review it. > Allow an element to have a text and attributes at the same time > --------------------------------------------------------------- > > Key: MODELLO-85 > URL: http://jira.codehaus.org/browse/MODELLO-85 > Project: Modello > Issue Type: New Feature > Components: modello-plugin-xml, modello-plugin-xpp3, modello-test > Affects Versions: 1.0-alpha-15 > Reporter: Franz Allan Valencia See > Attachments: MODELLO-85-modello.patch > > > h2. What is currently supported > According to Emmanuel, the following xml snippets are supported > {code:xml} > <fieldVar attVar="attValue"/> > {code} > {code:xml} > <fieldVar>some text</fieldVar> > {code} > {code:xml} > <fieldVar attVar="attValue"> > <param>some text</param> > </fieldVar> is supported > {code} > h2. What is currently not supported > or at least, it does not seem to be supported is > {code:xml} > <fieldVar attVar="attValue">some text</fieldVar> > {code} > h2. Proposed Solution > Thus, this leads me to my initial proposal of adding an "xml.classText" of type boolean to the field metadata. > With xml.classText, an xml snippet such as this... > {code:xml} > <someField>some field value</someField> > {code} > may be represented by > {code:xml} > <model> > ... > <classes> > ... > <class> > <name>someField</name> > ... > <field xml.classText="true"> > <name>anyName</name> > <version>4.0.0</version> > <type>String</type> > </field> > </class> > </classes> > </model> > {code} > Notet that "someField" here is actually a class that has a field variable declared as "anyName". > {code} > public class SomeField > { > private String anyName; > public String getAnyName() > { > return anyName; > } > public void setAnyName( String anyName ) > { > this.anyName = anyName; > } > } > {code} > Thus, we can now represent the earlier ( unsupported ) example > {code:xml} > <fieldVar attVar="attValue">some text</fieldVar> > {code} > With > {code:xml} > <model> > ... > <classes> > ... > <class> > <name>fieldVar</name> > ... > <field xml.attribute="true"> > <name>attVar</name> > <version>4.0.0</version> > <type>String</type> > </field> > <field xml.classText="true"> > <name>anyNameAgain</name> > <version>4.0.0</version> > <type>String</type> > </field> > </class> > </classes> > </model> > {code} > h2. WDYT? > Note that this is just my initial proposal. I am not sure what is the best solution to this. Any comments and suggestions would be greatly appreciated :-) -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira --------------------------------------------------------------------- To unsubscribe from this list please visit: http://xircles.codehaus.org/manage_email |
|
|
[jira] Updated: (MODELLO-85) Allow an element to have a text and attributes at the same time[ http://jira.codehaus.org/browse/MODELLO-85?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Dennis Lundberg updated MODELLO-85: ----------------------------------- Patch Submitted: [Yes] > Allow an element to have a text and attributes at the same time > --------------------------------------------------------------- > > Key: MODELLO-85 > URL: http://jira.codehaus.org/browse/MODELLO-85 > Project: Modello > Issue Type: New Feature > Components: modello-plugin-xml, modello-plugin-xpp3, modello-test > Affects Versions: 1.0-alpha-15 > Reporter: Franz Allan Valencia See > Attachments: MODELLO-85-modello.patch > > > h2. What is currently supported > According to Emmanuel, the following xml snippets are supported > {code:xml} > <fieldVar attVar="attValue"/> > {code} > {code:xml} > <fieldVar>some text</fieldVar> > {code} > {code:xml} > <fieldVar attVar="attValue"> > <param>some text</param> > </fieldVar> is supported > {code} > h2. What is currently not supported > or at least, it does not seem to be supported is > {code:xml} > <fieldVar attVar="attValue">some text</fieldVar> > {code} > h2. Proposed Solution > Thus, this leads me to my initial proposal of adding an "xml.classText" of type boolean to the field metadata. > With xml.classText, an xml snippet such as this... > {code:xml} > <someField>some field value</someField> > {code} > may be represented by > {code:xml} > <model> > ... > <classes> > ... > <class> > <name>someField</name> > ... > <field xml.classText="true"> > <name>anyName</name> > <version>4.0.0</version> > <type>String</type> > </field> > </class> > </classes> > </model> > {code} > Notet that "someField" here is actually a class that has a field variable declared as "anyName". > {code} > public class SomeField > { > private String anyName; > public String getAnyName() > { > return anyName; > } > public void setAnyName( String anyName ) > { > this.anyName = anyName; > } > } > {code} > Thus, we can now represent the earlier ( unsupported ) example > {code:xml} > <fieldVar attVar="attValue">some text</fieldVar> > {code} > With > {code:xml} > <model> > ... > <classes> > ... > <class> > <name>fieldVar</name> > ... > <field xml.attribute="true"> > <name>attVar</name> > <version>4.0.0</version> > <type>String</type> > </field> > <field xml.classText="true"> > <name>anyNameAgain</name> > <version>4.0.0</version> > <type>String</type> > </field> > </class> > </classes> > </model> > {code} > h2. WDYT? > Note that this is just my initial proposal. I am not sure what is the best solution to this. Any comments and suggestions would be greatly appreciated :-) -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira --------------------------------------------------------------------- To unsubscribe from this list please visit: http://xircles.codehaus.org/manage_email |
|
|
[jira] Updated: (MODELLO-85) Allow an element to have a text and attributes at the same time[ http://jira.codehaus.org/browse/MODELLO-85?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Herve Boutemy updated MODELLO-85: --------------------------------- Fix Version/s: 1.0 > Allow an element to have a text and attributes at the same time > --------------------------------------------------------------- > > Key: MODELLO-85 > URL: http://jira.codehaus.org/browse/MODELLO-85 > Project: Modello > Issue Type: New Feature > Components: modello-plugin-xml, modello-plugin-xpp3, modello-test > Affects Versions: 1.0-alpha-15 > Reporter: Franz Allan Valencia See > Fix For: 1.0 > > Attachments: MODELLO-85-modello.patch > > > h2. What is currently supported > According to Emmanuel, the following xml snippets are supported > {code:xml} > <fieldVar attVar="attValue"/> > {code} > {code:xml} > <fieldVar>some text</fieldVar> > {code} > {code:xml} > <fieldVar attVar="attValue"> > <param>some text</param> > </fieldVar> is supported > {code} > h2. What is currently not supported > or at least, it does not seem to be supported is > {code:xml} > <fieldVar attVar="attValue">some text</fieldVar> > {code} > h2. Proposed Solution > Thus, this leads me to my initial proposal of adding an "xml.classText" of type boolean to the field metadata. > With xml.classText, an xml snippet such as this... > {code:xml} > <someField>some field value</someField> > {code} > may be represented by > {code:xml} > <model> > ... > <classes> > ... > <class> > <name>someField</name> > ... > <field xml.classText="true"> > <name>anyName</name> > <version>4.0.0</version> > <type>String</type> > </field> > </class> > </classes> > </model> > {code} > Notet that "someField" here is actually a class that has a field variable declared as "anyName". > {code} > public class SomeField > { > private String anyName; > public String getAnyName() > { > return anyName; > } > public void setAnyName( String anyName ) > { > this.anyName = anyName; > } > } > {code} > Thus, we can now represent the earlier ( unsupported ) example > {code:xml} > <fieldVar attVar="attValue">some text</fieldVar> > {code} > With > {code:xml} > <model> > ... > <classes> > ... > <class> > <name>fieldVar</name> > ... > <field xml.attribute="true"> > <name>attVar</name> > <version>4.0.0</version> > <type>String</type> > </field> > <field xml.classText="true"> > <name>anyNameAgain</name> > <version>4.0.0</version> > <type>String</type> > </field> > </class> > </classes> > </model> > {code} > h2. WDYT? > Note that this is just my initial proposal. I am not sure what is the best solution to this. Any comments and suggestions would be greatly appreciated :-) -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira --------------------------------------------------------------------- To unsubscribe from this list, please visit: http://xircles.codehaus.org/manage_email |
|
|
[jira] Updated: (MODELLO-85) Allow an element to have a text and attributes at the same time[ http://jira.codehaus.org/browse/MODELLO-85?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Herve Boutemy updated MODELLO-85: --------------------------------- Fix Version/s: (was: 1.0) 1.1 > Allow an element to have a text and attributes at the same time > --------------------------------------------------------------- > > Key: MODELLO-85 > URL: http://jira.codehaus.org/browse/MODELLO-85 > Project: Modello > Issue Type: New Feature > Components: modello-plugin-xml, modello-plugin-xpp3, modello-test > Affects Versions: 1.0-alpha-15 > Reporter: Franz Allan Valencia See > Fix For: 1.1 > > Attachments: MODELLO-85-modello.patch > > > h2. What is currently supported > According to Emmanuel, the following xml snippets are supported > {code:xml} > <fieldVar attVar="attValue"/> > {code} > {code:xml} > <fieldVar>some text</fieldVar> > {code} > {code:xml} > <fieldVar attVar="attValue"> > <param>some text</param> > </fieldVar> is supported > {code} > h2. What is currently not supported > or at least, it does not seem to be supported is > {code:xml} > <fieldVar attVar="attValue">some text</fieldVar> > {code} > h2. Proposed Solution > Thus, this leads me to my initial proposal of adding an "xml.classText" of type boolean to the field metadata. > With xml.classText, an xml snippet such as this... > {code:xml} > <someField>some field value</someField> > {code} > may be represented by > {code:xml} > <model> > ... > <classes> > ... > <class> > <name>someField</name> > ... > <field xml.classText="true"> > <name>anyName</name> > <version>4.0.0</version> > <type>String</type> > </field> > </class> > </classes> > </model> > {code} > Notet that "someField" here is actually a class that has a field variable declared as "anyName". > {code} > public class SomeField > { > private String anyName; > public String getAnyName() > { > return anyName; > } > public void setAnyName( String anyName ) > { > this.anyName = anyName; > } > } > {code} > Thus, we can now represent the earlier ( unsupported ) example > {code:xml} > <fieldVar attVar="attValue">some text</fieldVar> > {code} > With > {code:xml} > <model> > ... > <classes> > ... > <class> > <name>fieldVar</name> > ... > <field xml.attribute="true"> > <name>attVar</name> > <version>4.0.0</version> > <type>String</type> > </field> > <field xml.classText="true"> > <name>anyNameAgain</name> > <version>4.0.0</version> > <type>String</type> > </field> > </class> > </classes> > </model> > {code} > h2. WDYT? > Note that this is just my initial proposal. I am not sure what is the best solution to this. Any comments and suggestions would be greatly appreciated :-) -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira --------------------------------------------------------------------- To unsubscribe from this list, please visit: http://xircles.codehaus.org/manage_email |
|
|
[jira] Commented: (MODELLO-85) Allow an element to have a text and attributes at the same time[ http://jira.codehaus.org/browse/MODELLO-85?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=167453#action_167453 ] Herve Boutemy commented on MODELLO-85: -------------------------------------- in MODELLO-113, a feature was added to support such an XML snippet: the chosen solution is to add a {{Content}} type that is considered as a {{String}} field. Your {{xml.classType}} proposal seems more extensible, since it allows any field type, not only {{String}} > Allow an element to have a text and attributes at the same time > --------------------------------------------------------------- > > Key: MODELLO-85 > URL: http://jira.codehaus.org/browse/MODELLO-85 > Project: Modello > Issue Type: New Feature > Components: modello-plugin-xml, modello-plugin-xpp3, modello-test > Affects Versions: 1.0-alpha-15 > Reporter: Franz Allan Valencia See > Fix For: 1.1 > > Attachments: MODELLO-85-modello.patch > > > h2. What is currently supported > According to Emmanuel, the following xml snippets are supported > {code:xml} > <fieldVar attVar="attValue"/> > {code} > {code:xml} > <fieldVar>some text</fieldVar> > {code} > {code:xml} > <fieldVar attVar="attValue"> > <param>some text</param> > </fieldVar> is supported > {code} > h2. What is currently not supported > or at least, it does not seem to be supported is > {code:xml} > <fieldVar attVar="attValue">some text</fieldVar> > {code} > h2. Proposed Solution > Thus, this leads me to my initial proposal of adding an "xml.classText" of type boolean to the field metadata. > With xml.classText, an xml snippet such as this... > {code:xml} > <someField>some field value</someField> > {code} > may be represented by > {code:xml} > <model> > ... > <classes> > ... > <class> > <name>someField</name> > ... > <field xml.classText="true"> > <name>anyName</name> > <version>4.0.0</version> > <type>String</type> > </field> > </class> > </classes> > </model> > {code} > Notet that "someField" here is actually a class that has a field variable declared as "anyName". > {code} > public class SomeField > { > private String anyName; > public String getAnyName() > { > return anyName; > } > public void setAnyName( String anyName ) > { > this.anyName = anyName; > } > } > {code} > Thus, we can now represent the earlier ( unsupported ) example > {code:xml} > <fieldVar attVar="attValue">some text</fieldVar> > {code} > With > {code:xml} > <model> > ... > <classes> > ... > <class> > <name>fieldVar</name> > ... > <field xml.attribute="true"> > <name>attVar</name> > <version>4.0.0</version> > <type>String</type> > </field> > <field xml.classText="true"> > <name>anyNameAgain</name> > <version>4.0.0</version> > <type>String</type> > </field> > </class> > </classes> > </model> > {code} > h2. WDYT? > Note that this is just my initial proposal. I am not sure what is the best solution to this. Any comments and suggestions would be greatly appreciated :-) -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira --------------------------------------------------------------------- To unsubscribe from this list, please visit: http://xircles.codehaus.org/manage_email |
|
|
[jira] Commented: (MODELLO-85) Allow an element to have a text and attributes at the same time[ http://jira.codehaus.org/browse/MODELLO-85?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=187300#action_187300 ] Herve Boutemy commented on MODELLO-85: -------------------------------------- I like your proposal and want to implement it in Modello 1.1 (deprecating {{Content}} type). But I don't like the {{xml.classText}} proposal :) What about {{xml.content}}? or {{xml.cdata}} (like DTD's CDATA)? Any better idea? > Allow an element to have a text and attributes at the same time > --------------------------------------------------------------- > > Key: MODELLO-85 > URL: http://jira.codehaus.org/browse/MODELLO-85 > Project: Modello > Issue Type: New Feature > Components: modello-plugin-xml, modello-plugin-xpp3, modello-test > Affects Versions: 1.0-alpha-15 > Reporter: Franz Allan Valencia See > Fix For: 1.1 > > Attachments: MODELLO-85-modello.patch > > > h2. What is currently supported > According to Emmanuel, the following xml snippets are supported > {code:xml} > <fieldVar attVar="attValue"/> > {code} > {code:xml} > <fieldVar>some text</fieldVar> > {code} > {code:xml} > <fieldVar attVar="attValue"> > <param>some text</param> > </fieldVar> is supported > {code} > h2. What is currently not supported > or at least, it does not seem to be supported is > {code:xml} > <fieldVar attVar="attValue">some text</fieldVar> > {code} > h2. Proposed Solution > Thus, this leads me to my initial proposal of adding an "xml.classText" of type boolean to the field metadata. > With xml.classText, an xml snippet such as this... > {code:xml} > <someField>some field value</someField> > {code} > may be represented by > {code:xml} > <model> > ... > <classes> > ... > <class> > <name>someField</name> > ... > <field xml.classText="true"> > <name>anyName</name> > <version>4.0.0</version> > <type>String</type> > </field> > </class> > </classes> > </model> > {code} > Notet that "someField" here is actually a class that has a field variable declared as "anyName". > {code} > public class SomeField > { > private String anyName; > public String getAnyName() > { > return anyName; > } > public void setAnyName( String anyName ) > { > this.anyName = anyName; > } > } > {code} > Thus, we can now represent the earlier ( unsupported ) example > {code:xml} > <fieldVar attVar="attValue">some text</fieldVar> > {code} > With > {code:xml} > <model> > ... > <classes> > ... > <class> > <name>fieldVar</name> > ... > <field xml.attribute="true"> > <name>attVar</name> > <version>4.0.0</version> > <type>String</type> > </field> > <field xml.classText="true"> > <name>anyNameAgain</name> > <version>4.0.0</version> > <type>String</type> > </field> > </class> > </classes> > </model> > {code} > h2. WDYT? > Note that this is just my initial proposal. I am not sure what is the best solution to this. Any comments and suggestions would be greatly appreciated :-) -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira --------------------------------------------------------------------- To unsubscribe from this list, please visit: http://xircles.codehaus.org/manage_email |
|
|
[jira] Updated: (MODELLO-85) Allow an element to have a text and attributes at the same time[ http://jira.codehaus.org/browse/MODELLO-85?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Herve Boutemy updated MODELLO-85: --------------------------------- Fix Version/s: (was: 1.1) 1.2 > Allow an element to have a text and attributes at the same time > --------------------------------------------------------------- > > Key: MODELLO-85 > URL: http://jira.codehaus.org/browse/MODELLO-85 > Project: Modello > Issue Type: New Feature > Components: modello-plugin-xml, modello-plugin-xpp3, modello-test > Affects Versions: 1.0-alpha-15 > Reporter: Franz Allan Valencia See > Fix For: 1.2 > > Attachments: MODELLO-85-modello.patch > > > h2. What is currently supported > According to Emmanuel, the following xml snippets are supported > {code:xml} > <fieldVar attVar="attValue"/> > {code} > {code:xml} > <fieldVar>some text</fieldVar> > {code} > {code:xml} > <fieldVar attVar="attValue"> > <param>some text</param> > </fieldVar> is supported > {code} > h2. What is currently not supported > or at least, it does not seem to be supported is > {code:xml} > <fieldVar attVar="attValue">some text</fieldVar> > {code} > h2. Proposed Solution > Thus, this leads me to my initial proposal of adding an "xml.classText" of type boolean to the field metadata. > With xml.classText, an xml snippet such as this... > {code:xml} > <someField>some field value</someField> > {code} > may be represented by > {code:xml} > <model> > ... > <classes> > ... > <class> > <name>someField</name> > ... > <field xml.classText="true"> > <name>anyName</name> > <version>4.0.0</version> > <type>String</type> > </field> > </class> > </classes> > </model> > {code} > Notet that "someField" here is actually a class that has a field variable declared as "anyName". > {code} > public class SomeField > { > private String anyName; > public String getAnyName() > { > return anyName; > } > public void setAnyName( String anyName ) > { > this.anyName = anyName; > } > } > {code} > Thus, we can now represent the earlier ( unsupported ) example > {code:xml} > <fieldVar attVar="attValue">some text</fieldVar> > {code} > With > {code:xml} > <model> > ... > <classes> > ... > <class> > <name>fieldVar</name> > ... > <field xml.attribute="true"> > <name>attVar</name> > <version>4.0.0</version> > <type>String</type> > </field> > <field xml.classText="true"> > <name>anyNameAgain</name> > <version>4.0.0</version> > <type>String</type> > </field> > </class> > </classes> > </model> > {code} > h2. WDYT? > Note that this is just my initial proposal. I am not sure what is the best solution to this. Any comments and suggestions would be greatly appreciated :-) -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira --------------------------------------------------------------------- To unsubscribe from this list, please visit: http://xircles.codehaus.org/manage_email |
| Free embeddable forum powered by Nabble | Forum Help |