Trimble Business Center

 View Only
Expand all | Collapse all

Trimble FXL XSD Schema

  • 1.  Trimble FXL XSD Schema

    Posted 20 days ago

    Hello,

    I need some XSD-Files but they are not available anymore:

    http://trimble.com/schema/fxl

    http://trimble.com/schema/linestyle

    http://trimble.com/schema/symbol

    http://trimble.com/schema/labelstyle

    http://trimble.com/schema/polygonlabel

    http://trimble.com/schema/linelabel

    http://trimble.com/schema/pointlabel

    Can someone provide me with these files? Or is there something newer than fxl?

    I would be happy if someone can help me.

    Thanks

    Julian



    ------------------------------
    Peter Pitser
    ------------------------------


  • 2.  RE: Trimble FXL XSD Schema

    Posted 19 days ago

    Peter,

    Are you looking for XSD files or FXLs? The former are just stylesheets for export/config. The latter is for feature coding. If XSDs are what you are after, see here: Stylesheets.



    ------------------------------
    Zach Edwards
    ------------------------------



  • 3.  RE: Trimble FXL XSD Schema

    Posted 19 days ago

    Peter,

    To my knowledge none of the XSD files for FXL or related schemas have been published.  However, all of them are embedded resources in Trimble.Vce.Data.FXL.dll and you can extract them from there.  That is how I have been acquiring them.



    ------------------------------
    Andrew Klingenberg
    ------------------------------



  • 4.  RE: Trimble FXL XSD Schema

    Posted 19 days ago

    @Andrew Klingenberg how do I extract those files from the dll? Thanks in advance



    ------------------------------
    Peter Pitser
    ------------------------------



  • 5.  RE: Trimble FXL XSD Schema

    Posted 19 days ago

    I am guessing that you right-click and unzip with something like 7zip. Treat it like a zip folder.



    ------------------------------
    Zach Edwards
    ------------------------------



  • 6.  RE: Trimble FXL XSD Schema

    Posted 18 days ago

    This takes a bit of work.   You can get at them with a string dumper, such as llvm-strings or gcc strings.  That's going to get everything with printable strings so you'll have to weed it down... search for the xml header and that will get you the start of each file, contents are within the starting and ending xs:schema element tags.  A good text editor will get you to this same point as well.

    These aren't string resources in the typical sense of DLL resources (i.e. in the .rsrc section), so a resource extractor won't find them.  They are all raw string data in the .text section.  I should have been clearer on this in my first post, sorry.

    Side note, it would be helpful if Trimble published these like the rest of the schemas (e.g. JobXML, RoadXML, etc).  I use them frequently.  Not sure how many other folks would find this handy but it doesn't look like I'm the only one.



    ------------------------------
    Andrew Klingenberg
    ------------------------------



  • 7.  RE: Trimble FXL XSD Schema

    Posted 18 days ago
      |   view attached

    If you open the DLL in Notepad++ it seems you can relative simply just copy/paste it out of there.

    From the end of line 6639 to 47681.

    I used it as exercise to familiarize myself a bit more with those chatbots.

    I threw the copy/paste content from the DLL at it, had it remove illegal characters and split it at each new schema start.

    It came up with the following Python script and the attached split up files.

    import re
    from pathlib import Path
    from html import unescape
    import zipfile
    
    # Load raw text
    text = Path("DLL_Dump.txt").read_text(errors="ignore")
    
    # Remove invalid XML characters
    illegal_xml = re.compile(r'[^\x09\x0A\x0D\x20-\x7E]')
    text = illegal_xml.sub('', text)
    
    # Unescape HTML entities (< > &)
    text = unescape(text)
    
    # Locate embedded XSD schemas
    schema_re = re.compile(
        r'(<\?xml\s+version="1\.0"\s+encoding="UTF-8"\s*\?>\s*'
        r'<xs:schema[\s\S]*?</xs:schema>)',
        re.IGNORECASE
    )
    
    schemas = schema_re.findall(text)
    
    out_dir = Path("schemas_out")
    out_dir.mkdir(exist_ok=True)
    
    name_counts = {}
    
    for schema in schemas:
        # Determine base name from targetNamespace
        m = re.search(r'targetNamespace\s*=\s*"([^"]+)"', schema)
        base = m.group(1).rstrip('/#').split('/')[-1] if m else "schema"
        base = re.sub(r'[^A-Za-z0-9_.-]', '_', base)
    
        suffix = ""
    
        # Special handling for FXL schemas
        if base.lower() == "fxl":
            vm = re.search(
                r'FXL\s+Schema\s+Definition\s+Version\s*([0-9.]+)',
                schema,
                re.IGNORECASE
            )
            if vm:
                suffix = "_" + vm.group(1).replace('.', '_')
    
        # Handle duplicates (only when no version suffix is present)
        name_counts[base] = name_counts.get(base, 0) + 1
        dup = f"_{name_counts[base]}" if name_counts[base] > 1 and not suffix else ""
    
        filename = f"{base}{suffix}{dup}.xsd"
        (out_dir / filename).write_text(schema, encoding="utf-8")
    
    # Zip the results
    with zipfile.ZipFile("schemas_fxl_versioned.zip", "w", zipfile.ZIP_DEFLATED) as z:
        for f in out_dir.iterdir():
            z.write(f, f.name)
    
    print(f"Extracted {len(schemas)} schemas")


    ------------------------------
    Ronny Schneider
    ------------------------------

    Attachment(s)

    zip
    schemas_fxl_versioned.zip   105 KB 1 version


  • 8.  RE: Trimble FXL XSD Schema

    Posted 18 days ago
    Edited by Peter Pitser 17 days ago

    Hey guys,

    thank you all it helped me a lot. I just downloaded your zip-file Ronny.

    I also tried to usw 7zip and then open the extracted file in notepad++ and extracted the columns manually but I am happy, some of you already did plenty of work.

    is there also a smarter way to export all style definitions for, point symbols, linestyles, Points, lines, Layer definitions, Textstyles and hatchstyles/hatches?

    My workflow right now is to export a FXL-File and for the Hatches i export a *.pat-File. 

    Does someone know if there are also XSD files for Leica GSI and Leica HeXML?

    Thanks in advance 

    Julian



    ------------------------------
    Peter Pitser
    ------------------------------