Skip to content

Commit

Permalink
add escape pipe in xml templates
Browse files Browse the repository at this point in the history
  • Loading branch information
Matt Anikiej committed Aug 19, 2024
1 parent 8df9252 commit 792fb87
Show file tree
Hide file tree
Showing 4 changed files with 49 additions and 49 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@ href="https://pds.nasa.gov/pds4/pds/v1/PDS4_PDS_1L00.sch" schematypens="http://p
<Product_Browse>
<Identification_Area>
<logical_identifier>
{{lid}}
{{lid|e}}
</logical_identifier>
<version_id>1.0</version_id>
<title>
{{title}}
{{title|e}}
</title>
<information_model_version>1.21.0.0</information_model_version>
<product_class>Product_Browse</product_class>
Expand All @@ -17,7 +17,7 @@ href="https://pds.nasa.gov/pds4/pds/v1/PDS4_PDS_1L00.sch" schematypens="http://p
<Internal_Reference>
<!-->lid_reference is incorrect, used as filler right now</-->
<lid_reference>
{{lid_ref}}
{{lid_ref|e}}
</lid_reference>
<reference_type>browse_to_data</reference_type>
<comment>
Expand All @@ -27,15 +27,15 @@ href="https://pds.nasa.gov/pds4/pds/v1/PDS4_PDS_1L00.sch" schematypens="http://p
</Reference_List>
<File_Area_Browse>
<File>
<file_name>{{file_name}}</file_name>
<file_name>{{file_name|e}}</file_name>
<local_identifier>BROWSE_FILE</local_identifier>
<creation_date_time>{{file_date}}</creation_date_time>
<file_URL>{{file_url}}</file_URL>
<creation_date_time>{{file_date|e}}</creation_date_time>
<file_URL>{{file_url|e}}</file_URL>
</File>
<Encoded_Image>
<local_identifier>BROWSE_IMAGE</local_identifier>
<offset unit="byte">0</offset>
<encoding_standard_id>{{encoding}}</encoding_standard_id>
<encoding_standard_id>{{encoding|e}}</encoding_standard_id>
</Encoded_Image>
</File_Area_Browse>
</Product_Browse>
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,14 @@
http://pds.nasa.gov/pds4/cart/v1 https://pds.nasa.gov/pds4/cart/v1/PDS4_CART_1L00_1970.xsd">

<Identification_Area>
<logical_identifier>{{lid}}</logical_identifier>
<logical_identifier>{{lid|e}}</logical_identifier>
<version_id>1.0</version_id>
<title>{{title}}</title>
<title>{{title|e}}</title>
<information_model_version>1.21.0.0</information_model_version>
<product_class>Product_External</product_class>
<Modification_History>
<Modification_Detail>
<modification_date>{{modification_date}}</modification_date>
<modification_date>{{modification_date|e}}</modification_date>
<version_id>1.0</version_id>
<description>
Derived release of the LOLA LIDAR shots in a stretched LAZ/COPC format for streaming services
Expand All @@ -39,15 +39,15 @@
<Discipline_Area>
<cart:Cartography>
<Local_Internal_Reference>
<local_identifier_reference>{{lid_ref}}</local_identifier_reference>
<local_identifier_reference>{{lid_ref|e}}</local_identifier_reference>
<local_reference_type>cartography_parameters_to_service</local_reference_type>
</Local_Internal_Reference>
<cart:Spatial_Domain>
<cart:Bounding_Coordinates>
<cart:west_bounding_coordinate unit="deg">{{bb_west}}</cart:west_bounding_coordinate>
<cart:east_bounding_coordinate unit="deg">{{bb_east}}</cart:east_bounding_coordinate>
<cart:north_bounding_coordinate unit="deg">{{bb_north}}</cart:north_bounding_coordinate>
<cart:south_bounding_coordinate unit="deg">{{bb_south}}</cart:south_bounding_coordinate>
<cart:west_bounding_coordinate unit="deg">{{bb_west|e}}</cart:west_bounding_coordinate>
<cart:east_bounding_coordinate unit="deg">{{bb_east|e}}</cart:east_bounding_coordinate>
<cart:north_bounding_coordinate unit="deg">{{bb_north|e}}</cart:north_bounding_coordinate>
<cart:south_bounding_coordinate unit="deg">{{bb_south|e}}</cart:south_bounding_coordinate>
</cart:Bounding_Coordinates>
</cart:Spatial_Domain>
<cart:Spatial_Reference_Information>
Expand Down Expand Up @@ -76,9 +76,9 @@
</Context_Area>
<File_Area_External>
<File>
<file_name>{{file_name}}</file_name>
<local_identifier>{{lid_file}}</local_identifier>
<creation_date_time>{{file_date}}</creation_date_time>
<file_name>{{file_name|e}}</file_name>
<local_identifier>{{lid_file|e}}</local_identifier>
<creation_date_time>{{file_date|e}}</creation_date_time>
<file_URL>{{file_url}}</file_URL>
<!-- <file_size unit="byte">{{file_size}}</file_size> -->
<comment>
Expand All @@ -96,7 +96,7 @@
<Reference_List>
{% for reference in reference_list %}
<Internal_Reference>
<lid_reference>{{reference}}</lid_reference>
<lid_reference>{{reference|e}}</lid_reference>
<reference_type>external_used_to_derive_gridded_data</reference_type>
</Internal_Reference>
{% endfor %}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
<Product_Collection xmlns="http://pds.nasa.gov/pds4/pds/v1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://pds.nasa.gov/pds4/pds/v1 https://pds.nasa.gov/pds4/pds/v1/PDS4_PDS_1M00.xsd">

<Identification_Area>
<logical_identifier>{{lid}}</logical_identifier>
<logical_identifier>{{lid|e}}</logical_identifier>
<version_id>1.0</version_id>
<title>{{api_title}}</title>
<title>{{api_title|e}}</title>
<information_model_version>1.22.0.0</information_model_version>
<product_class>Product_Collection</product_class>

Expand All @@ -21,7 +21,7 @@

<File_Area_Inventory>
<File>
<file_name>{{inventory_file_name}}</file_name>
<file_name>{{inventory_file_name|e}}</file_name>
</File>
<Inventory>
<offset unit="byte">0</offset>
Expand Down
54 changes: 27 additions & 27 deletions src/pds/registry/utils/treks/templates/product-service-template.xml
Original file line number Diff line number Diff line change
@@ -1,22 +1,22 @@
<Product_Service xmlns="http://pds.nasa.gov/pds4/pds/v1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:cart="http://pds.nasa.gov/pds4/cart/v1" xsi:schemaLocation="http://pds.nasa.gov/pds4/pds/v1 https://pds.nasa.gov/pds4/pds/v1/PDS4_PDS_1M00.xsd">
<Identification_Area>
<logical_identifier>{{lid}}</logical_identifier>
<version_id>{{vid}}</version_id>
<title>{{title}}</title>
<logical_identifier>{{lid|e}}</logical_identifier>
<version_id>{{vid|e}}</version_id>
<title>{{title|e}}</title>
<information_model_version>1.22.0.0</information_model_version>
<product_class>Product_Service</product_class>
<Modification_History>
<Modification_Detail>
<modification_date>{{modification_date}}</modification_date>
<modification_date>{{modification_date|e}}</modification_date>
<version_id>1.0</version_id>
<description>Exposing GIS services in the PDS4 registry</description>
</Modification_Detail>
</Modification_History>
</Identification_Area>
<Observation_Area>
<Time_Coordinates>
<start_date_time>{{start_time}}</start_date_time>
<stop_date_time>{{stop_time}}</stop_date_time>
<start_date_time>{{start_time|e}}</start_date_time>
<stop_date_time>{{stop_time|e}}</stop_date_time>
</Time_Coordinates>
<Investigation_Area>
<name>Treks Open Geospatial Consortium Web Mapping Tile Service</name>
Expand All @@ -29,59 +29,59 @@
<Observing_System>
{% for component in observing_system_components %}
<Observing_System_Component>
<name>{{component[0]}}</name>
<type>{{component[1]}}</type>
<name>{{component[0]|e}}</name>
<type>{{component[1]|e}}</type>
</Observing_System_Component>
{% endfor %}
</Observing_System>
<Target_Identification>
<name>{{target}}</name>
<type>{{target_type}}</type>
<name>{{target|e}}</name>
<type>{{target_type|e}}</type>
</Target_Identification>
<Discipline_Area>
<cart:Cartography>
<Local_Internal_Reference>
<local_identifier_reference>{{lid_ref}}</local_identifier_reference>
<local_identifier_reference>{{lid_ref|e}}</local_identifier_reference>
<local_reference_type>cartography_parameters_to_service</local_reference_type>
</Local_Internal_Reference>
<cart:Spatial_Domain>
<cart:Bounding_Coordinates>
<cart:west_bounding_coordinate unit="deg">{{bbox_west}}</cart:west_bounding_coordinate>
<cart:south_bounding_coordinate unit="deg">{{bbox_south}}</cart:south_bounding_coordinate>
<cart:east_bounding_coordinate unit="deg">{{bbox_east}}</cart:east_bounding_coordinate>
<cart:north_bounding_coordinate unit="deg">{{bbox_north}}</cart:north_bounding_coordinate>
<cart:west_bounding_coordinate unit="deg">{{bbox_west|e}}</cart:west_bounding_coordinate>
<cart:south_bounding_coordinate unit="deg">{{bbox_south|e}}</cart:south_bounding_coordinate>
<cart:east_bounding_coordinate unit="deg">{{bbox_east|e}}</cart:east_bounding_coordinate>
<cart:north_bounding_coordinate unit="deg">{{bbox_north|e}}</cart:north_bounding_coordinate>
</cart:Bounding_Coordinates>
</cart:Spatial_Domain>
<cart:Spatial_Reference_Information>
<cart:Horizontal_Coordinate_System_Definition>
<cart:Geographic>
<cart:latitude_resolution unit="{{unit}}">{{lat_res}}</cart:latitude_resolution>
<cart:longitude_resolution unit="{{unit}}">{{lon_res}}</cart:longitude_resolution>
<cart:latitude_resolution unit="{{unit}}">{{lat_res|e}}</cart:latitude_resolution>
<cart:longitude_resolution unit="{{unit}}">{{lon_res|e}}</cart:longitude_resolution>
</cart:Geographic>
<cart:Geodetic_Model>
<cart:spheroid_name>{{spheroid_name}}</cart:spheroid_name>
<cart:a_axis_radius unit="m">{{axis_radius}}</cart:a_axis_radius>
<cart:b_axis_radius unit="m">{{axis_radius}}</cart:b_axis_radius>
<cart:c_axis_radius unit="m">{{axis_radius}}</cart:c_axis_radius>
<cart:a_axis_radius unit="m">{{axis_radius|e}}</cart:a_axis_radius>
<cart:b_axis_radius unit="m">{{axis_radius|e}}</cart:b_axis_radius>
<cart:c_axis_radius unit="m">{{axis_radius|e}}</cart:c_axis_radius>
</cart:Geodetic_Model>
</cart:Horizontal_Coordinate_System_Definition>
</cart:Spatial_Reference_Information>
</cart:Cartography>
</Discipline_Area>
</Observation_Area>
<Service>
<name>{{name}}</name>
<abstract_desc>{{abstract}}</abstract_desc>
<url>{{capabilities_url}}</url>
<url>{{fgdc_url}}</url>
<url>{{gui_url}}</url>
<release_date>{{release_date}}</release_date>
<name>{{name|e}}</name>
<abstract_desc>{{abstract|e}}</abstract_desc>
<url>{{capabilities_url|e}}</url>
<url>{{fgdc_url|e}}</url>
<url>{{gui_url|e}}</url>
<release_date>{{release_date|e}}</release_date>
<service_type>OGC WMTS</service_type>
<category>Visualization</category>
</Service>
<Reference_List>
<Internal_Reference>
<lid_reference>{{target_lid}}</lid_reference>
<lid_reference>{{target_lid|e}}</lid_reference>
<reference_type>data_to_target</reference_type>
</Internal_Reference>
</Reference_List>
Expand Down

0 comments on commit 792fb87

Please sign in to comment.