cancel
Showing results for 
Search instead for 
Did you mean: 

Space in Static Text

Former Member
0 Kudos

Hi everybody,

when using the static text property for one field in the syndicator, I have a problem with just setting a space. No matter how many spaces I set there, the tag in XML is always empty.

Do I have to escape this somehow and if yes how? Is there any workaround to create this tag with only a space between opening and closing tags?

Best regards

Christian

Accepted Solutions (1)

Accepted Solutions (1)

michael_theis
Active Contributor
0 Kudos

Hi Christian,

which MDM version are you using?

Did you try the & n b s p ; (html escape, of course w/o the blanks in between)?

Best regards

Michael

Former Member
0 Kudos

Hi Michael,

I'm on SP06 P02/03. The problem is that, no matter how many spaces are in a field, the XML shows simply an empty tag. The same if I unmap and use Static Text.

If I use Static Text and then escape (URL) I also would have expected a %20, but it also does not appear.

It looks like MDM ignores all spaces.

The XML files have to be imported into SQL Server. However I am not sure how to mask the characters accordingly.

Best regards

Christian

michael_theis
Active Contributor
0 Kudos

Hi Christian,

I've tried to reproduce this on on my local machine. I'm using the latest MDM 5.5 Patch 3 hotfix (5.5.63.89). If I add one or more blanks as static text, the result is the following:

single blank w/o escaping => <XML Tag> </XML Tag> (this is what you'd expect, right?)

single blank w/ HTML escaping => <XML Tag> </XML Tag> (this looks like a bug, because I'd expect the & n b s p ; in this case)

single blank w/ URL escaping => <XML Tag>%20</XML Tag> (looks OK)

The same is valid for multiple blanks (e.g. three blanks with URL encode result in %20%20%20). Is it possible for you to upgrade to the latest HF? If not, I'd suggest to open a CSS ticket on this one.

Cheers

Michael

Former Member
0 Kudos

Thanks, Michael. We will try to upgrade.

Christian

Former Member
0 Kudos

Hi Michael,

we have upgrade to 5.5.64.71, but it still does not work.

Considering your three cases (above), only the third (w/ URL escaping) works. Both others only show an empty tag. Furthermore I cannot create a space in a field in Data Manager.

Any more ideas? Is there any setting for the XSD maybe? So far XSD settings seem to be ignored by Syndicator.

Best regards

Christian

michael_theis
Active Contributor
0 Kudos

Hi Christian,

I'm not sure how Syndicator is handling the XSDs (unfortunately I'm not the Syndicator developer). Could you share your XSD, or at least the definition of the affected element? Anyways it looks more and more like a bug...

Best regards

Michael

Former Member
0 Kudos

Hi Michael,

the line is pretty simple as follows:

<xs:element default=" " name="field_name" type="xs:string" />

Note that Syndicator ignores any default values anyway. The space is a fixed value, so it does not matter whether it comes from Data Manager or from the Static Text property in Syndicator.

By the way, I tried the Text Qualifier and I get one space (qualified), independent from the actual number of spaces I entered.

Christian

michael_theis
Active Contributor
0 Kudos

Hi Christian,

you're right, the default attribute seems to be ignored, even if you add a text in there. But Syndicator seems to handle at least some of the settings. See below an XSD I've just tested with your build


<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" 
elementFormDefault="qualified" attributeFormDefault="unqualified">
<xs:element name="ROOT">
 <xs:complexType>
  <xs:sequence>
   <xs:element name="DefaultSpace" type="xs:string" default=" "/>
   <xs:element name="DefaultText" type="xs:string" default="text"/>
   <xs:element name="DefaultRestriction" default="text">
    <xs:simpleType>
     <xs:restriction base="xs:string">
      <xs:minLength value="1"/>
      <xs:maxLength value="10"/>
     </xs:restriction>
    </xs:simpleType>
   </xs:element>
   <xs:element name="MinMaxLength">
    <xs:simpleType>
     <xs:restriction base="xs:string">
      <xs:minLength value="1"/>
      <xs:maxLength value="10"/>
     </xs:restriction>
    </xs:simpleType>
   </xs:element>
   <xs:element name="MaxLength">
    <xs:simpleType>
     <xs:restriction base="xs:string">
      <xs:maxLength value="10"/>
     </xs:restriction>
    </xs:simpleType>
   </xs:element>
   <xs:element name="WhiteSpace">
    <xs:simpleType>
     <xs:restriction base="xs:string">
      <xs:whiteSpace value="preserve"/>
     </xs:restriction>
    </xs:simpleType>
   </xs:element>
   <xs:element name="MAPME"/>
  </xs:sequence>
 </xs:complexType>
</xs:element>
</xs:schema>

In Syndicator I created a simple map with:

- no blanks for the "Default*" fields

- three blanks for fields "MinMaxLength", "MaxLength" and "WhiteSpace" as static values

- a repository field mapped to "MAPME"

The XML file looks like


<ROOT>
 <DefaultSpace/>
 <DefaultText/>
 <DefaultRestriction/>
 <MinMaxLength>   </MinMaxLength>
 <MaxLength>    </MaxLength>
 <WhiteSpace>   </WhiteSpace>
 <MAPME>Test</MAPME>
</ROOT>

So it looks like Syndicator is ignoring any default attribute values. But if you add a restriction to your element definition in the XSD, you should be able to get the blanks as output.

Best regards

Michael

Former Member
0 Kudos

Hi Christian,

I think we cannot put space between the xml tags.

Regards,

Jitesh Talreja

Former Member
0 Kudos

Thanks again, Michael. After a short test that works for us.

Best regards

Christian

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi Christian,

Try to use the Text Qualifier property. Set this to any one value from the list available and check if it is useful to you.

For properties like Default Text, Static Text it will ignore the space.

Kindly update us so that we can try with some other alternative.

Regards,

Jitesh Talreja

Former Member
0 Kudos

Hi Jitesh,

if setting the text qualifier, it fills out the field only with the qualifiers selected. However, there is still no space in between.

Christian