A Possible Raw Extension XML

The following raw extension XML is just one way the header might be represented.

There are two things you might do differently.

  • You might choose a different name value when you set up your raw to canonical transformation.
  • You might also choose to keep the raw name and do a straight across transformation. In this case, the name value is the same as the expression value.
<extension xmlns="http://www.hybris.com/schema/" name="base-raw-datahub-extension">
    <rawItems>
        <item>
            <type>RawProduct</type>
            <description>Raw representation of a product</description>
            <attributes>
                <attribute>
                    <name>sourceId</name>
                </attribute>
                <attribute>
                    <name>baseName</name>
                </attribute>
                <attribute>
                    <name>baseDescription</name>
                </attribute>
                <attribute>
                    <name>ean</name>
                </attribute>
                <attribute>
                    <name>manufacturerName</name>
                </attribute>
                <attribute>
                    <name>manufacturerAid</name>
                </attribute>
                <attribute>
                    <name>unit</name>
                </attribute>
                <attribute>
                    <name>style</name>
                </attribute>
                <attribute>
                    <name>size</name>
                </attribute>
                <attribute>
                    <name>sku</name>
                </attribute>
                <attribute>
                    <name>category</name>
                </attribute>
                <attribute>
                    <name>styleName</name>
                </attribute>
                <attribute>
                    <name>styleDescription</name>
                </attribute>
            </attributes>
        </item>  
    </rawItems>
    <canonicalItems>
        <item>
            <type>CanonicalProduct</type>
            <attributes>
                <attribute>
                    <name>identifier</name>
                    <transformations>
                        <transformation>
                            <rawSource>RawProduct</rawSource>
                            <expression>sourceId</expression>
                        </transformation>
                    </transformations>
                </attribute>
                <attribute>
                    <name>name</name>
                    <transformations>
                        <transformation>
                            <rawSource>RawProduct</rawSource>
                            <expression>baseName</expression>
                        </transformation>
                    </transformations>
                </attribute>
                <attribute>
                    <name>description</name>
                    <transformations>
                        <transformation>
                            <rawSource>RawProduct</rawSource>
                            <expression>baseDescription</expression>
                        </transformation>
                    </transformations>
                </attribute>
                <attribute>
                    <name>barCode</name>
                    <transformations>
                        <transformation>
                            <rawSource>RawProduct</rawSource>
                            <expression>ean</expression>
                        </transformation>
                    </transformations>
                </attribute>
                <attribute>
                    <name>manName</name>
                    <transformations>
                        <transformation>
                            <rawSource>RawProduct</rawSource>
                            <expression>manufacturerName</expression>
                        </transformation>
                    </transformations>
                </attribute>
                <attribute>
                    <name>manAid</name>
                    <transformations>
                        <transformation>
                            <rawSource>RawProduct</rawSource>
                            <expression>manufacturerAid</expression>
                        </transformation>
                    </transformations>
                </attribute>
                <attribute>
                    <name>unit</name>
                    <transformations>
                        <transformation>
                            <rawSource>RawProduct</rawSource>
                            <expression>unit</expression>
                        </transformation>
                    </transformations>
                </attribute>
                <attribute>
                    <name>style</name>
                    <transformations>
                        <transformation>
                            <rawSource>RawProduct</rawSource>
                            <expression>style</expression>
                        </transformation>
                    </transformations>
                </attribute>
                <attribute>
                    <name>size</name>
                    <transformations>
                        <transformation>
                            <rawSource>RawProduct</rawSource>
                            <expression>size</expression>
                        </transformation>
                    </transformations>
                </attribute>
                <attribute>
                    <name>sku</name>
                    <transformations>
                        <transformation>
                            <rawSource>RawProduct</rawSource>
                            <expression>sku</expression>
                        </transformation>
                    </transformations>
                </attribute>
                <attribute>
                    <name>category</name>
                    <transformations>
                        <transformation>
                            <rawSource>RawProduct</rawSource>
                            <expression>category</expression>
                        </transformation>
                    </transformations>
                </attribute>
                <attribute>
                    <name>styleName</name>
                    <transformations>
                        <transformation>
                            <rawSource>RawProduct</rawSource>
                            <expression>styleName</expression>
                        </transformation>
                    </transformations>
                </attribute>
                <attribute>
                    <name>styleDescription</name>
                    <transformations>
                        <transformation>
                            <rawSource>RawProduct</rawSource>
                            <expression>styleDescription</expression>
                        </transformation>
                    </transformations>
                </attribute>                
            </attributes>
        </item>
    </canonicalItems>
</extension>