Skip to content

Commit

Permalink
orsr form api override embedded true
Browse files Browse the repository at this point in the history
  • Loading branch information
celuchmarek committed Jun 25, 2024
1 parent 675c8a4 commit 5023830
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -364,7 +364,7 @@ public static String fillXsdIdentifier(String formIdentifier) {
}

public static boolean isOrsrUri(String uri) {
return uri != null && uri.contains("://eformulare.justice.sk");
return uri != null && uri.contains("://eformulare.justice.sk") || uri.contains("justice.gov.sk/");
}

public static String getFsFormIdFromFilename(String filename) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,11 @@ private static EFormAttributes build(String identifier, String transformation, S
}
}

if (transformation != null)
if (transformation != null) {
xsltParams = EFormUtils.fillXsltParams(transformation, identifier, xsltParams);
if (!transformation.isEmpty() && transformation.charAt(0) == '\uFEFF')
transformation = transformation.substring(1);
}

if (containerXmlns != null && containerXmlns.contains("xmldatacontainer")) {

Expand All @@ -52,6 +55,9 @@ private static EFormAttributes build(String identifier, String transformation, S
throw new EFormException("Chýba identifikátor", "Identifikátor je povinný atribút pre XML Datacontainer");
}

if (EFormUtils.isOrsrUri(identifier))
embedUsedSchemas = true;

return new EFormAttributes(identifier, transformation, schema, containerXmlns, xsdIdentifier, xsltParams, embedUsedSchemas);
}
}

0 comments on commit 5023830

Please sign in to comment.