Hi Mikko,
The report XSL themselves can be edited to provide stations/units to whatever you want. This may be the best option for what you need currently.
Regards,
Mark
OpenRoads Designer 2022 R3 (10.12) | Microstation 2023.1 | ProjectWise CE 3.4
Yes. Currently the only available solution.
Thanks to Paul, my colleague, who provided few examples:
eg if the station is 10,000.000 then
<xsl:value-of select="format-number(number(Start/station/@externalStation),'##+###.000')"/>
will output 10+000.000
or
<xsl:value-of select="format-number(number(Start/station/@externalStation),'##km ###.000')"/>
will output 10km 000.000
<xsl:value-of select="format-number(number(Start/station/@externalStation),'#.000')"/>
will output 10000.000
Thanks Mark and jpln !
I am not familiar with editing XSL and as I tried to put the above examples to the code, I couldn't get right results. As default, my code looks like this:
<xsl:value-of select="cif:stationFormat(number(GeometryPoint/station/@externalStation), string(GeometryPoint/station/@externalStationName))"/>
I tried to put the "'##+###.000'" several different ways, but didn't have success. Below example:
<xsl:value-of select="cif:stationFormat(number(GeometryPoint/station/@externalStation),'##+###.000')"/>
What I am doing wrong here? It seems that xsl doesn't recognize hash symbol as a reference for the corresponding station values.
Is there any "XSL for dummies" -guide specifically for OpenRoads/-Rail users?
Br,Mikko
You are very close. Instead of:
change to:
<xsl:value-of select='format-number(number(GeometryPoint/station/@externalStation), "##+###.000")'/>
Thanks again, but still not showing right:Br,Mikko
Just some misplaced symbols - updated previous post
More info on the format-number() function here: XSLT format-number() Function (w3schools.com) - This site is really good to learn generic XSLT
Thanks, but still no luck
So the problem lies in "number"-parameter? Where can I find the alignment's raw xml-document from which the xls finds the data?
You must check the xpath is good. GeometryPoint/station/@externalStation
The best is to check from the original xsl because there is no reason to change anything regarding the xpath if you just work on the formatting
"@externalstation" is the value you want to format and is found at GeometryPoint/station/.
In the report browser you can check by using Tools/Show All.xsl
The externalStation value is zero at Tools/Show All.xsl and /raw-xml.xsl. So that explains why the stations aren't showing up.
The follow up question is why the values are zero? Stationing works just fine in the model and when alignment is annotated.