Skip to content

Hyperlink Style does not Validate in ooxml #3220

@CrpeNctem

Description

@CrpeNctem

The library creates in styles.xml this code (Current Code):
<w:style w:type="character" w:styleId="Hyperlink">
<w:name w:val="Hyperlink"/>
<w:basedOn w:val="DefaultParagraphFont"/>
<w:uiPriority w:val="99"/>
<w:unhideWhenUsed/>
<w:rPr>
<w:u w:val="single"/>
<w:color w:val="0563C1"/>
</w:rPr>
</w:style>

the ooxml Validator and Microsoft Word (before 2013) expect this (Expected Code):
<w:style w:type="character" w:styleId="Hyperlink">
<w:name w:val="Hyperlink"/>
<w:basedOn w:val="DefaultParagraphFont"/>
<w:uiPriority w:val="99"/>
<w:unhideWhenUsed/>
<w:rPr>
<w:color w:val="0000FF" w:themeColor="hyperlink"/>
<w:u w:val="single"/>
</w:rPr>
</w:style>

In the library this Code snippet seems to be the problem:
{id:"Hyperlink",name:"Hyperlink",basedOn:"DefaultParagraphFont",run:{color:"0563C1",underline:{type:Uo.SINGLE}}

The Order is not conforming with ISO/IEC 29500-1 (OOXML Spec). It seems the library serialized run.color / <w:color> after the <w:u>

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions