code: public static void collectSchemaXpathsForSimpleValues(
          CmsObject cms,
          CmsXmlContentDefinition def,
          String path,
          Set<String> result) {
  
          List<I_CmsXmlSchemaType> nestedTypes = def.getTypeSequence();
          for (I_CmsXmlSchemaType nestedType : nestedTypes) {
              String subPath = path + "/" + nestedType.getName();
              if (nestedType instanceof CmsXmlNestedContentDefinition) {
                  CmsXmlContentDefinition nestedDef = ((CmsXmlNestedContentDefinition)nestedType).getNestedContentDefinition();
                  collectSchemaXpathsForSimpleValues(cms, nestedDef, subPath, result);
              } else {
                  result.add(subPath);
              }
          }
      }
docs: Collects a list of all possible XPaths for a content definition.<p>
  
  @param cms the CMS context to use
  @param def the content definition
  @param path the path of the given content definition
  @param result the set used to collect the XPaths