Skip to content

Format for xsi:schemaLocation #825

@angelozerr

Description

@angelozerr

It would be nice to provide custom format for xsi:schemaLocation.

Here several samples that I have found:

<p:Person
   xmlns:p="http://contoso.com/People"
   xmlns:v="http://contoso.com /Vehicles"
   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
   xsi:schemaLocation=
     "http://contoso.com/People 
      http://contoso.com/schemas/people.xsd 
      http://contoso.com/schemas/Vehicles
      http://contoso.com/schemas/vehicles.xsd
      http://contoso.com/schemas/People
      http://contoso.com/schemas/people.xsd">
<beans
  xmlns="http://www.springframework.org/schema/beans"
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xsi:schemaLocation="
    http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
    http://camel.apache.org/schema/spring http://camel.apache.org/schema/spring/camel-spring-2.13.1.xsd">

An idea is to have a xml.format.schemaLocationHint settings

  • with 0 (no format):
  xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd http://camel.apache.org/schema/spring http://camel.apache.org/schema/spring/camel-spring-2.13.1.xsd">
  • with 1:
  xsi:schemaLocation="http://www.springframework.org/schema/beans 
                                     http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
                                     http://camel.apache.org/schema/spring 
                                     http://camel.apache.org/schema/spring/camel-spring-2.13.1.xsd">
  • with 2:
  xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
                                     http://camel.apache.org/schema/spring http://camel.apache.org/schema/spring/camel-spring-2.13.1.xsd">

Metadata

Metadata

Assignees

Labels

enhancementNew feature or requestformattingThis issue or enhancement is related to formatting support

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions