Closed skinkie closed 3 months ago
Thanks for reporting @skinkie
The tree serializer, wasn't encoding values before feeding them to the tree builders, stuff like xs:NMTOKENS
was failing.
Thanks for reporting @skinkie
The tree serializer, wasn't encoding values before feeding them to the tree builders, stuff like
xs:NMTOKENS
was failing.
I'll test if the rest works now too.
@tefra I think it is worse now, now all attributes are gone.
<ServiceJourneyPattern>
<RouteRef></RouteRef>
<DirectionRef></DirectionRef>
<DestinationDisplayRef></DestinationDisplayRef>
<pointsInSequence>
<StopPointInJourneyPattern>
<ScheduledStopPointRef></ScheduledStopPointRef>
<OnwardTimingLinkRef></OnwardTimingLinkRef>
<IsWaitPoint>true</IsWaitPoint>
</StopPointInJourneyPattern>
<StopPointInJourneyPattern>
<ScheduledStopPointRef></ScheduledStopPointRef>
</StopPointInJourneyPattern>
</pointsInSequence>
</ServiceJourneyPattern>
What I expect:
<ServiceJourneyPattern id="WSF:ServiceJourneyPattern:B-V" version="1">
<RouteRef version="1" ref="WSF:Route:B-V"/>
<DirectionRef version="1" ref="OPENOV:Direction:outbound"/>
<DestinationDisplayRef version="1" ref="WSF:DestinationDisplay:V"/>
<pointsInSequence>
<StopPointInJourneyPattern id="WSF:StopPointInJourneyPattern:B-V-B" version="1" order="1">
<ScheduledStopPointRef version="1" ref="WSF:ScheduledStopPoint:B"/>
<OnwardTimingLinkRef version="1" ref="WSF:TimingLink:B-V"/>
<IsWaitPoint>true</IsWaitPoint>
</StopPointInJourneyPattern>
<StopPointInJourneyPattern id="WSF:StopPointInJourneyPattern:B-V-V" version="1" order="2">
<ScheduledStopPointRef version="1" ref="WSF:ScheduledStopPoint:V"/>
</StopPointInJourneyPattern>
</pointsInSequence>
</ServiceJourneyPattern>
Yeap I forgot to encode the attrs as well @skinkie, next one, please open new issues please, with simple examples that I can quickly reproduce
I am trying out #975.
The writing fails on the lxml_serializer.render, which complains with:
If it can parse the code it, must be able to write it right?
With XmlTreeSerializer serialisation works.
File can be downloaded from: https://data.ndovloket.nl/netex/wsf/NeTEx_WSF_WSF_20240415_20240415.xml.gz
I have also found other bugs with rendering via lxmltreeserializer, where some elements just don't get rendered, their element name is added, but for example not their attributes.