Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

JavaDoc generated from XML may contain malformed html #581

Open
Lukiz opened this issue Jan 4, 2025 · 3 comments
Open

JavaDoc generated from XML may contain malformed html #581

Lukiz opened this issue Jan 4, 2025 · 3 comments
Labels
bug-external Issue concerns an external dependency

Comments

@Lukiz
Copy link

Lukiz commented Jan 4, 2025

I have sample xsd that looks like this:

<?xml version="1.0" encoding="utf-8"?>
<xs:schema attributeFormDefault="unqualified" elementFormDefault="qualified" xmlns:xs="http://www.w3.org/2001/XMLSchema">
    <xs:element name="Data">
        <xs:complexType>
            <xs:sequence>
                <xs:element name="Age" type="xs:unsignedByte" />
                <xs:element name="Under18" type="xs:boolean" >
                    <xs:annotation>
                        <xs:documentation>Resolve age &lt;&gt; 18</xs:documentation>
                    </xs:annotation>
                </xs:element>
            </xs:sequence>
        </xs:complexType>
    </xs:element>
</xs:schema>

After generating java code the entity for less-then sign &lt; is not preserved as escaped entity but replaced with proper character <.

    /**
     * Resolve age <> 18
     * 
     */
    @XmlElement(name = "Under18")
    protected boolean under18;

It leads to invalid HTML.
Our project has check for valid JavaDoc and fails on malformed HTML.

@laurentschoelens
Copy link
Collaborator

Hi @Lukiz

Thanks for the report of the issue.
I'll check this but my guess is that's a jaxb-jxc related bug.

I'll keep you updated soon.

Regards
Laurent

@laurentschoelens
Copy link
Collaborator

Hi @Lukiz

I confirm the bug in XJC part.
Could you create the corresponding issue in jaxb-ri project ?

Thanks

@laurentschoelens laurentschoelens added the bug-external Issue concerns an external dependency label Jan 13, 2025
@Lukiz
Copy link
Author

Lukiz commented Jan 14, 2025

Created eclipse-ee4j/jaxb-ri#1826

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug-external Issue concerns an external dependency
Projects
None yet
Development

No branches or pull requests

2 participants