Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

XML File Format Issue

kiranh38591442
Level 1
Level 1

We are facing an issue when we format the XML files(rep:policy.xml, .content.xml, etc) created by AEM and deployed as part of our codebase through maven build.

When we format the XML file and moved each attribute of jcr:root tag to a new line then the content is not getting deployed properly(the content is deployed as plain XML file instead of a node or sometimes it won’t get deployed).

We have seen this behavior in AEM 6.4 and 6.2.

In the below example each attribute is moved to a new line and this causes an issue when we deploy.

<?xml version="1.0" encoding="UTF-8"?>

<jcr:root

     xmlns:crx="http://www.day.com/crx/1.0"

     xmlns:jcr="http://www.jcp.org/jcr/1.0"

     xmlns:rep="internal"

     jcr:primaryType="rep:ACL">

....

</jcr:root>

In the below example the attributes are added in the same line and this gets deployed properly.

<?xml version="1.0" encoding="UTF-8"?>

<jcr:root xmlns:crx="http://www.day.com/crx/1.0" xmlns:jcr="http://www.jcp.org/jcr/1.0" xmlns:rep="internal"

jcr:primaryType="rep:ACL">

....

</jcr:root>

Please let us know whether moving the attributes to newline in the jcr:root tag is an issue in AEM.

0 Replies