Не удается загрузить надстройку Outlook с правилом BodyAsHTML - PullRequest
0 голосов
/ 18 июня 2019

Я не могу загрузить манифест надстройки, который содержит правило для контекстного запуска надстройки, если HTML-контент содержит некоторое регулярное выражение. Фрагмент манифеста ниже:

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<OfficeApp xmlns="http://schemas.microsoft.com/office/appforoffice/1.1" 
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
    xmlns:bt="http://schemas.microsoft.com/office/officeappbasictypes/1.0" 
    xmlns:mailappor="http://schemas.microsoft.com/office/mailappversionoverrides/1.0" 
    xsi:type="MailApp">
    ...
    <Hosts>
        <Host Name="Mailbox"/>
    </Hosts>
    <Requirements>
        <Sets>
            <Set Name="Mailbox" MinVersion="1.1"/>
        </Sets>
    </Requirements>
    <FormSettings>
        <Form xsi:type="ItemRead">
            <DesktopSettings>
                <SourceLocation DefaultValue="https://localhost:3000/action_contextual.html"/>
                <RequestedHeight>215</RequestedHeight>
            </DesktopSettings>
        </Form>
    </FormSettings>
    <Permissions>ReadWriteItem</Permissions>
    <Rule xsi:type="RuleCollection" Mode="And">
        <Rule xsi:type="ItemIs" ItemType="Message" FormType="Read"/>
        <Rule xsi:type="ItemHasRegularExpressionMatch" PropertyName="BodyAsHTML" RegExName="ActionURL" RegExValue="title=&quot;https://www\.w3schools\.com&quot;"/>
    </Rule>
    <DisableEntityHighlighting>false</DisableEntityHighlighting>

    <VersionOverrides xmlns="http://schemas.microsoft.com/office/mailappversionoverrides" xsi:type="VersionOverridesV1_0">
        <VersionOverrides xmlns="http://schemas.microsoft.com/office/mailappversionoverrides/1.1" xsi:type="VersionOverridesV1_1">
            <Requirements>
                <bt:Sets DefaultMinVersion="1.5">
                    <bt:Set Name="Mailbox" />
                </bt:Sets>
            </Requirements>
            <Hosts>
                <Host xsi:type="MailHost">
                    <DesktopFormFactor>
                        <!-- DetectedEntity -->
                        <ExtensionPoint xsi:type="DetectedEntity">
                            <Label resid="ActionsLabel" />
                            <SourceLocation resid="contextual_url" />
                            <Rule xsi:type="RuleCollection" Mode="And">
                                <Rule xsi:type="ItemIs" ItemType="Message"/>
                                <Rule xsi:type="ItemHasRegularExpressionMatch" PropertyName="BodyAsHTML" RegExName="ActionURL" RegExValue="title=&quot;https://www\.w3schools\.com&quot;"/>
                            </Rule>
                        </ExtensionPoint>

                        ...
                    </DesktopFormFactor>
                </Host>
            </Hosts>

            <Resources>
                ...
            </Resources>
        </VersionOverrides>
    </VersionOverrides>
</OfficeApp>

При боковой загрузке я получаю следующую ошибку: The VersionOverrides 1.1 section of the manifest is invalid. You must specify at least one highlight attribute in a rule. If it is a RuleCollection, please ensure each subrule contains a highlight attribute in OR mode and at least one subrule has a highlight attribute in AND mode.

Несмотря на то, что я добавляю атрибуты Highlight="none" для правил, я не могу исправить эту ошибку.

Добро пожаловать на сайт PullRequest, где вы можете задавать вопросы и получать ответы от других членов сообщества.
...