[jira] Created: (MILYN-185) Implemeng EDI segment groups

View: New views
7 Messages — Rating Filter:   Alert me  

[jira] Created: (MILYN-185) Implemeng EDI segment groups

by JIRA jira@codehaus.org :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Implemeng EDI segment groups
----------------------------

                 Key: MILYN-185
                 URL: http://jira.codehaus.org/browse/MILYN-185
             Project: Milyn
          Issue Type: New Feature
          Components: EdiSax
    Affects Versions: Smooks v1.0.1
            Reporter: Maurice Zeijen
            Assignee: Maurice Zeijen
             Fix For: Smooks v1.1


EDI messages can contain repeating segment groups. For example:

ART|1|Aspirin
PRI|1.20
ING|400|mg|Acetylsalicylsäure
ART|2|Magnesium Verla N
PRI|5.20
ING|||Trimagnesiumdicitrat-9-Wasser

To be able to process this we need segment groups. A segment group is a group of segments which can repeat. A segment group should be able to contain child segment groups. This way you can create a very sophisticated structure. The mapping file could look like this:

{code:xml}
<?xml version="1.0" encoding="UTF-8"?>
<medi:edimap xmlns:medi="http://www.milyn.org/schema/edi-message-mapping-1.0.xsd">

    <medi:description name="Article import" version="1.0" />

    <medi:delimiters segment=" " field="|" component="^" sub-component="~" />

    <medi:segments xmltag="articles">
         
        <medi:segment-group xmltag="article">
            <medi:segment segcode="ART" xmltag="article-details">
                <medi:field xmltag="article-id"/>
                <medi:field xmltag="article-name"/>
            </medi:segment>

            <medi:segment segcode="PRI" xmltag="price">
                <medi:field xmltag="price"/>
            </medi:segment>

            <medi:segment segcode="ING" xmltag="ingredient-mix" maxOccurs="-1">
                <medi:field xmltag="volume"/>
                <medi:field xmltag="volume-unit"/>
                <medi:field xmltag="volume-description"/>
            </medi:segment>
       <medi:segment-group>

    </medi:segments>

</medi:edimap>
{code}



--
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: (MILYN-185) Implement repeating EDI segment groups

by JIRA jira@codehaus.org :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


     [ http://jira.codehaus.org/browse/MILYN-185?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Maurice Zeijen updated MILYN-185:
---------------------------------

    Summary: Implement repeating EDI segment groups  (was: Implemeng EDI segment groups)

> Implement repeating EDI segment groups
> --------------------------------------
>
>                 Key: MILYN-185
>                 URL: http://jira.codehaus.org/browse/MILYN-185
>             Project: Milyn
>          Issue Type: New Feature
>          Components: EdiSax
>    Affects Versions: Smooks v1.0.1
>            Reporter: Maurice Zeijen
>            Assignee: Maurice Zeijen
>             Fix For: Smooks v1.1
>
>
> EDI messages can contain repeating segment groups. For example:
> ART|1|Aspirin
> PRI|1.20
> ING|400|mg|Acetylsalicylsäure
> ART|2|Magnesium Verla N
> PRI|5.20
> ING|||Trimagnesiumdicitrat-9-Wasser
> To be able to process this we need segment groups. A segment group is a group of segments which can repeat. A segment group should be able to contain child segment groups. This way you can create a very sophisticated structure. The mapping file could look like this:
> {code:xml}
> <?xml version="1.0" encoding="UTF-8"?>
> <medi:edimap xmlns:medi="http://www.milyn.org/schema/edi-message-mapping-1.0.xsd">
>     <medi:description name="Article import" version="1.0" />
>     <medi:delimiters segment=" " field="|" component="^" sub-component="~" />
>     <medi:segments xmltag="articles">
>          
>         <medi:segment-group xmltag="article">
>             <medi:segment segcode="ART" xmltag="article-details">
>                 <medi:field xmltag="article-id"/>
>                 <medi:field xmltag="article-name"/>
>             </medi:segment>
>             <medi:segment segcode="PRI" xmltag="price">
>                 <medi:field xmltag="price"/>
>             </medi:segment>
>             <medi:segment segcode="ING" xmltag="ingredient-mix" maxOccurs="-1">
>                 <medi:field xmltag="volume"/>
>                 <medi:field xmltag="volume-unit"/>
>                 <medi:field xmltag="volume-description"/>
>             </medi:segment>
>        <medi:segment-group>
>     </medi:segments>
> </medi:edimap>
> {code}

--
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: (MILYN-185) Implement repeating EDI segment groups

by JIRA jira@codehaus.org :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


     [ http://jira.codehaus.org/browse/MILYN-185?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Tom Fennelly updated MILYN-185:
-------------------------------

    Fix Version/s:     (was: Smooks v1.1)
                   Smooks v1.2

> Implement repeating EDI segment groups
> --------------------------------------
>
>                 Key: MILYN-185
>                 URL: http://jira.codehaus.org/browse/MILYN-185
>             Project: Milyn
>          Issue Type: New Feature
>          Components: EdiSax
>    Affects Versions: Smooks v1.0.1
>            Reporter: Maurice Zeijen
>            Assignee: Maurice Zeijen
>             Fix For: Smooks v1.2
>
>
> EDI messages can contain repeating segment groups. For example:
> ART|1|Aspirin
> PRI|1.20
> ING|400|mg|Acetylsalicylsäure
> ART|2|Magnesium Verla N
> PRI|5.20
> ING|||Trimagnesiumdicitrat-9-Wasser
> To be able to process this we need segment groups. A segment group is a group of segments which can repeat. A segment group should be able to contain child segment groups. This way you can create a very sophisticated structure. The mapping file could look like this:
> {code:xml}
> <?xml version="1.0" encoding="UTF-8"?>
> <medi:edimap xmlns:medi="http://www.milyn.org/schema/edi-message-mapping-1.0.xsd">
>     <medi:description name="Article import" version="1.0" />
>     <medi:delimiters segment=" " field="|" component="^" sub-component="~" />
>     <medi:segments xmltag="articles">
>          
>         <medi:segment-group xmltag="article">
>             <medi:segment segcode="ART" xmltag="article-details">
>                 <medi:field xmltag="article-id"/>
>                 <medi:field xmltag="article-name"/>
>             </medi:segment>
>             <medi:segment segcode="PRI" xmltag="price">
>                 <medi:field xmltag="price"/>
>             </medi:segment>
>             <medi:segment segcode="ING" xmltag="ingredient-mix" maxOccurs="-1">
>                 <medi:field xmltag="volume"/>
>                 <medi:field xmltag="volume-unit"/>
>                 <medi:field xmltag="volume-description"/>
>             </medi:segment>
>        <medi:segment-group>
>     </medi:segments>
> </medi:edimap>
> {code}

--
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: (MILYN-185) Implement repeating EDI segment groups

by JIRA jira@codehaus.org :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


    [ http://jira.codehaus.org/browse/MILYN-185?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=147953#action_147953 ]

Ivan Peev commented on MILYN-185:
---------------------------------

Would you consider moving the implementation of this feature for 1.1 version? The EDI segment loops are used in most EDI messages and this feature is major requirement.

> Implement repeating EDI segment groups
> --------------------------------------
>
>                 Key: MILYN-185
>                 URL: http://jira.codehaus.org/browse/MILYN-185
>             Project: Milyn
>          Issue Type: New Feature
>          Components: EdiSax
>    Affects Versions: Smooks v1.0.1
>            Reporter: Maurice Zeijen
>            Assignee: Maurice Zeijen
>             Fix For: Smooks v1.2
>
>
> EDI messages can contain repeating segment groups. For example:
> ART|1|Aspirin
> PRI|1.20
> ING|400|mg|Acetylsalicylsäure
> ART|2|Magnesium Verla N
> PRI|5.20
> ING|||Trimagnesiumdicitrat-9-Wasser
> To be able to process this we need segment groups. A segment group is a group of segments which can repeat. A segment group should be able to contain child segment groups. This way you can create a very sophisticated structure. The mapping file could look like this:
> {code:xml}
> <?xml version="1.0" encoding="UTF-8"?>
> <medi:edimap xmlns:medi="http://www.milyn.org/schema/edi-message-mapping-1.0.xsd">
>     <medi:description name="Article import" version="1.0" />
>     <medi:delimiters segment=" " field="|" component="^" sub-component="~" />
>     <medi:segments xmltag="articles">
>          
>         <medi:segment-group xmltag="article">
>             <medi:segment segcode="ART" xmltag="article-details">
>                 <medi:field xmltag="article-id"/>
>                 <medi:field xmltag="article-name"/>
>             </medi:segment>
>             <medi:segment segcode="PRI" xmltag="price">
>                 <medi:field xmltag="price"/>
>             </medi:segment>
>             <medi:segment segcode="ING" xmltag="ingredient-mix" maxOccurs="-1">
>                 <medi:field xmltag="volume"/>
>                 <medi:field xmltag="volume-unit"/>
>                 <medi:field xmltag="volume-description"/>
>             </medi:segment>
>        <medi:segment-group>
>     </medi:segments>
> </medi:edimap>
> {code}

--
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: (MILYN-185) Implement repeating EDI segment groups

by JIRA jira@codehaus.org :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


    [ http://jira.codehaus.org/browse/MILYN-185?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=148102#action_148102 ]

Maurice Zeijen commented on MILYN-185:
--------------------------------------

Sorry Ivan, we decided that it was best to get the 1.1 release out there as fast as possible. Because we haven't started even on the implementation of this feature we decided to move it out of version 1.1. You must now that you can process segments loops already (at the moment that I made the Issue I didn't know...) like this:

{code:xml}
<?xml version="1.0" encoding="UTF-8"?>
<medi:edimap xmlns:medi="http://www.milyn.org/schema/edi-message-mapping-1.0.xsd">

    <medi:description name="Article import" version="1.0" />

    <medi:delimiters segment=" " field="|" component="^" sub-component="~" />

    <medi:segments xmltag="articles">
         
                <medi:segment segcode="ART" xmltag="article">
                        <medi:field xmltag="article-id"/>
                        <medi:field xmltag="article-name"/>

                        <medi:segment segcode="PRI" xmltag="price">
                                <medi:field xmltag="price"/>
                        </medi:segment>

                        <medi:segment segcode="ING" xmltag="ingredient-mix" maxOccurs="-1">
                                <medi:field xmltag="volume"/>
                                <medi:field xmltag="volume-unit"/>
                                <medi:field xmltag="volume-description"/>
                        </medi:segment>
                </medi:segment>
               
    </medi:segments>

</medi:edimap>
{code}

This generates the following sax stream:

{code:xml}
<articles>

        <article>
                <article-id></article-id>
                <article-name></article-name>
                <price>
                        <price></price>
                </price>
                <ingredient-mix>
                        <volume></volume>
                        <volume-unit></volume-unit>
                        <volume-description></volume-description>
                </ingredient-mix>
               
        </article>
       
        <article>
                .....
        </article>
</articles>
{code}

There is a difference in that implementation and my proposed one, namely that the looping groups them selves are not surrounded by a separate tag.

> Implement repeating EDI segment groups
> --------------------------------------
>
>                 Key: MILYN-185
>                 URL: http://jira.codehaus.org/browse/MILYN-185
>             Project: Milyn
>          Issue Type: New Feature
>          Components: EdiSax
>    Affects Versions: Smooks v1.0.1
>            Reporter: Maurice Zeijen
>            Assignee: Maurice Zeijen
>             Fix For: Smooks v1.2
>
>
> EDI messages can contain repeating segment groups. For example:
> ART|1|Aspirin
> PRI|1.20
> ING|400|mg|Acetylsalicylsäure
> ART|2|Magnesium Verla N
> PRI|5.20
> ING|||Trimagnesiumdicitrat-9-Wasser
> To be able to process this we need segment groups. A segment group is a group of segments which can repeat. A segment group should be able to contain child segment groups. This way you can create a very sophisticated structure. The mapping file could look like this:
> {code:xml}
> <?xml version="1.0" encoding="UTF-8"?>
> <medi:edimap xmlns:medi="http://www.milyn.org/schema/edi-message-mapping-1.0.xsd">
>     <medi:description name="Article import" version="1.0" />
>     <medi:delimiters segment=" " field="|" component="^" sub-component="~" />
>     <medi:segments xmltag="articles">
>          
>         <medi:segment-group xmltag="article">
>             <medi:segment segcode="ART" xmltag="article-details">
>                 <medi:field xmltag="article-id"/>
>                 <medi:field xmltag="article-name"/>
>             </medi:segment>
>             <medi:segment segcode="PRI" xmltag="price">
>                 <medi:field xmltag="price"/>
>             </medi:segment>
>             <medi:segment segcode="ING" xmltag="ingredient-mix" maxOccurs="-1">
>                 <medi:field xmltag="volume"/>
>                 <medi:field xmltag="volume-unit"/>
>                 <medi:field xmltag="volume-description"/>
>             </medi:segment>
>        <medi:segment-group>
>     </medi:segments>
> </medi:edimap>
> {code}

--
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: (MILYN-185) Implement repeating EDI segment groups

by JIRA jira@codehaus.org :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


    [ http://jira.codehaus.org/browse/MILYN-185?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=148754#action_148754 ]

Ivan Peev commented on MILYN-185:
---------------------------------

Maurice,

You are correct. Great. This information escaped to me as well. It is probably a good idea to change the default sample to show the support for this feature. Thank you for your feedback.

> Implement repeating EDI segment groups
> --------------------------------------
>
>                 Key: MILYN-185
>                 URL: http://jira.codehaus.org/browse/MILYN-185
>             Project: Milyn
>          Issue Type: New Feature
>          Components: EdiSax
>    Affects Versions: Smooks v1.0.1
>            Reporter: Maurice Zeijen
>            Assignee: Maurice Zeijen
>             Fix For: Smooks v1.2
>
>
> EDI messages can contain repeating segment groups. For example:
> ART|1|Aspirin
> PRI|1.20
> ING|400|mg|Acetylsalicylsäure
> ART|2|Magnesium Verla N
> PRI|5.20
> ING|||Trimagnesiumdicitrat-9-Wasser
> To be able to process this we need segment groups. A segment group is a group of segments which can repeat. A segment group should be able to contain child segment groups. This way you can create a very sophisticated structure. The mapping file could look like this:
> {code:xml}
> <?xml version="1.0" encoding="UTF-8"?>
> <medi:edimap xmlns:medi="http://www.milyn.org/schema/edi-message-mapping-1.0.xsd">
>     <medi:description name="Article import" version="1.0" />
>     <medi:delimiters segment=" " field="|" component="^" sub-component="~" />
>     <medi:segments xmltag="articles">
>          
>         <medi:segment-group xmltag="article">
>             <medi:segment segcode="ART" xmltag="article-details">
>                 <medi:field xmltag="article-id"/>
>                 <medi:field xmltag="article-name"/>
>             </medi:segment>
>             <medi:segment segcode="PRI" xmltag="price">
>                 <medi:field xmltag="price"/>
>             </medi:segment>
>             <medi:segment segcode="ING" xmltag="ingredient-mix" maxOccurs="-1">
>                 <medi:field xmltag="volume"/>
>                 <medi:field xmltag="volume-unit"/>
>                 <medi:field xmltag="volume-description"/>
>             </medi:segment>
>        <medi:segment-group>
>     </medi:segments>
> </medi:edimap>
> {code}

--
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] Closed: (MILYN-185) Implement repeating EDI segment groups

by JIRA jira@codehaus.org :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


     [ http://jira.codehaus.org/browse/MILYN-185?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Tom Fennelly closed MILYN-185.
------------------------------

         Assignee: Tom Fennelly  (was: Maurice Zeijen)
       Resolution: Fixed
    Fix Version/s:     (was: Smooks v1.2)
                   Smooks v1.1

This is done for v1.1.

Example:
{code}
<?xml version="1.0" encoding="UTF-8"?>
<medi:edimap xmlns:medi="http://www.milyn.org/schema/edi-message-mapping-1.1.xsd">

    <medi:description name="Test Message" version="1.0"/>

    <medi:delimiters segment=" " field="*" component="^" sub-component="~" escape="?"/>

    <medi:segments xmltag="test-message">

        <medi:segment segcode="SEG" xmltag="message-seg" maxOccurs="4">
            <medi:field xmltag="field-1"/>
            <medi:field xmltag="field-2"/>
            <medi:field xmltag="field-3"/>
            <medi:field xmltag="field-4"/>
            <medi:field xmltag="field-5"/>
        </medi:segment>

        <medi:segmentGroup>

            <medi:segment xmltag="aa" segcode="1A" minOccurs="2">
                <medi:field xmltag="field-1"/>
            </medi:segment>
            <medi:segment xmltag="aaa" segcode="2A">
                <medi:field xmltag="field-1"/>
                <medi:field xmltag="field-2"/>
            </medi:segment>

            <medi:segmentGroup xmltag="thebees">
                <medi:segment xmltag="bb" segcode="1B">
                    <medi:field xmltag="field-1"/>
                </medi:segment>
                <medi:segment xmltag="bbb" segcode="2B">
                    <medi:field xmltag="field-1"/>
                    <medi:field xmltag="field-2"/>
                </medi:segment>
            </medi:segmentGroup>

        </medi:segmentGroup>

    </medi:segments>

</medi:edimap>
{code}

So the segmentGroup has an optional "xmlTag" attribute.  If added, the segments defined in the group will be enclosed in that element.  If not added, they will be at the same level.

A segmentGroup must have at least one segment at the start.  Thereafter, it can have unbound <segment> or <segmentGroup> elements.  A <segmentGroup>  also has min/max cardinality.

> Implement repeating EDI segment groups
> --------------------------------------
>
>                 Key: MILYN-185
>                 URL: http://jira.codehaus.org/browse/MILYN-185
>             Project: Milyn
>          Issue Type: New Feature
>          Components: EdiSax
>    Affects Versions: Smooks v1.0.1
>            Reporter: Maurice Zeijen
>            Assignee: Tom Fennelly
>             Fix For: Smooks v1.1
>
>
> EDI messages can contain repeating segment groups. For example:
> ART|1|Aspirin
> PRI|1.20
> ING|400|mg|Acetylsalicylsäure
> ART|2|Magnesium Verla N
> PRI|5.20
> ING|||Trimagnesiumdicitrat-9-Wasser
> To be able to process this we need segment groups. A segment group is a group of segments which can repeat. A segment group should be able to contain child segment groups. This way you can create a very sophisticated structure. The mapping file could look like this:
> {code:xml}
> <?xml version="1.0" encoding="UTF-8"?>
> <medi:edimap xmlns:medi="http://www.milyn.org/schema/edi-message-mapping-1.0.xsd">
>     <medi:description name="Article import" version="1.0" />
>     <medi:delimiters segment=" " field="|" component="^" sub-component="~" />
>     <medi:segments xmltag="articles">
>          
>         <medi:segment-group xmltag="article">
>             <medi:segment segcode="ART" xmltag="article-details">
>                 <medi:field xmltag="article-id"/>
>                 <medi:field xmltag="article-name"/>
>             </medi:segment>
>             <medi:segment segcode="PRI" xmltag="price">
>                 <medi:field xmltag="price"/>
>             </medi:segment>
>             <medi:segment segcode="ING" xmltag="ingredient-mix" maxOccurs="-1">
>                 <medi:field xmltag="volume"/>
>                 <medi:field xmltag="volume-unit"/>
>                 <medi:field xmltag="volume-description"/>
>             </medi:segment>
>        <medi:segment-group>
>     </medi:segments>
> </medi:edimap>
> {code}

--
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


LightInTheBox - Buy quality products at wholesale price!